LuckyQ[n_] := Equal @@ (Total /@ Partition[IntegerDigits[n,10,6],3])

LuckyQ[100]

LuckyQ[10001]

l=Select[Range[0,999999], LuckyQ]

Length[l]

Plus@@ l

(Plus@@ l)/13

(Plus@@ l)/1001