|
|
A174569
|
|
Numbers n such that sum of factorials of digits of n is a power of 2.
|
|
1
|
|
|
1, 2, 10, 11, 22, 23, 32, 102, 103, 112, 113, 120, 121, 130, 131, 200, 201, 210, 211, 234, 235, 243, 253, 300, 301, 310, 311, 324, 325, 342, 352, 423, 432, 523, 532, 1000, 1001, 1010, 1011, 1034, 1035, 1043, 1053, 1100, 1101, 1110, 1111, 1134, 1135, 1143, 1153, 1304, 1305, 1314, 1315, 1340
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
EXAMPLE
|
234 is in the sequence because 2! + 3! + 4! = 32 = 2^5.
|
|
MAPLE
|
with(numtheory):for n from 1 to 2000 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!:od: q:= evalf(log[2](s));
if floor(q)= q then printf(`%d, `, n):else fi:od:
|
|
MATHEMATICA
|
With[{pwrs2 = 2^Range[0, 200]}, Select[Range[1500], MemberQ[pwrs2, Total[IntegerDigits[#]!]] &]] (* Harvey P. Dale, Jan 03 2011 *)
|
|
PROG
|
(Sage) A174569 = list(n for n in IntegerRange(1, 2000) if sum(factorial(d) for d in n.digits()).is_power_of(2))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|