A182452 Numbers for which the sum of reciprocals of square of digits is an integer.
1, 11, 111, 1111, 2222, 11111, 12222, 21222, 22122, 22212, 22221, 111111, 112222, 121222, 122122, 122212, 122221, 211222, 212122, 212212, 212221, 221122, 221212, 221221, 222112, 222121, 222211, 222336, 222363, 222633, 223236, 223263, 223326, 223362, 223623
Offset: 1
Examples
223623 is in the sequence because 1/2^2 + 1/2^2 + 1/3^2 + 1/6^2 + 1/2^2 + 1/3^2 = 1 is an integer.
Crossrefs
Cf. A034708.
Programs
-
Maple
T:=array(1..10):for n from 1 to 10^7 do:T:=convert(n,base,10):n1:=nops(T): s:=0:j:=0:for k from 1 to n1 do:if T[k]<>0 then s:=s+evalf(1/T[k]^2):else j:=1:fi: od: if j=0 and s=floor(s) then printf(`%d, `,n):else fi:od:
-
Mathematica
f[ n_ ] := 1/n^2; a[ n_ ] := Apply[ Plus, Map[ f, IntegerDigits[ n ] ] ] ; Select[ Range[ 1000 ], FreeQ[ IntegerDigits[ # ], 0 ] && IntegerQ[ a [ # ] ] & ]