OFFSET
1,2
COMMENTS
The sequence contains a majority of numbers with two identical digits at least, but there exists a finite subset A = {1, 4, 9, 10, 40, 90, 156789, 156798, ..., 9876510} of 7!+6 = 5046 numbers with distinct decimal digits. The numbers > 90 of A are all permutations of 1567890.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
597618 is in the sequence because :
5+9+7+6+1+8 = 36 = 6^2 ;
5^2+9^2+7^2+6^2+1^2+8^2 = 256 = 16^2.
MAPLE
for n from 1 to 6000 do:l:=evalf(floor(ilog10(n))+1):n0:=n:s1:=0:s2:=0:for m from 1 to l do:q:=n0:u:=irem(q, 10):v:=iquo(q, 10): n0:=v :s1:=s1+u:s2:=s2+u^2: od:if sqrt(s1)=floor(sqrt(s1)) and sqrt(s2)=floor(sqrt(s2)) then printf(`%d, `, n): else fi:od:
MATHEMATICA
sdQ[n_]:=Module[{idn=IntegerDigits[n]}, IntegerQ[Sqrt[Total[idn]]] && IntegerQ[Sqrt[Total[idn^2]]]]; Select[Range[6000], sdQ] (* Harvey P. Dale, Oct 25 2011 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, Oct 10 2011
STATUS
approved