OFFSET
1,2
EXAMPLE
10012 is in the sequence because (1!)^2 +(0!)^2 +(0!)^2 +(1!)^2 +(2!)^2 = 8 = 2^3.
MAPLE
with(numtheory):for n from 1 to 100000 do:l:=length(n):n0:=n:s:=0:for m from
1 to l do:q:=n0:u:=irem(q, 10):v:=iquo(q, 10):n0:=v :s:=s+(u!)^2:od: q:= evalf(log[2](s));
if floor(q)= q then printf(`%d, `, n):else fi:od:
PROG
(Sage) A174570 = list(n for n in IntegerRange(1, 10**5) if sum(factorial(d)**2 for d in n.digits()).is_power_of(2))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, Nov 29 2010
STATUS
approved