|
|
A191895
|
|
Smallest multiple of n whose factorial digit sum equals n.
|
|
0
|
|
|
1, 2, 12, 112, 220, 222, 2212, 32, 12222, 1230, 1232, 2232, 22230, 1330, 30030, 3232, 20332, 1000332, 223231, 33300, 23331, 132330, 213233, 233232, 12233300, 104, 12222333, 224, 2204, 12240, 341, 3040, 202224, 10234, 23240, 2000304, 3034, 4332, 30342, 133240, 220334, 1032234
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
EXAMPLE
|
a(7) = 2212 = 7*316 because 2! + 2! + 1! + 2! = 7.
|
|
MAPLE
|
with(numtheory): for n from 1 to 42 do: found:=false: for k from n by n while not found do q:=k: s:=0:
for m from 1 to length(k) do s:=s+irem(q, 10)! : q:=iquo(q, 10): od:
if s=n then found:=true: printf(`%d, `, k) fi od od:
|
|
MATHEMATICA
|
smn[n_]:=Module[{m=1}, While[Total[IntegerDigits[m*n]!]!=n, m++]; m*n]; Array[ smn, 50] (* Harvey P. Dale, Nov 17 2018 *)
|
|
PROG
|
(PARI) a(n)={ my(t, d=49); while((d-47)!<=n, d++); forstep(k=n, 9e99, n, t=Vecsmall(Str(k)); if( t[1]>d, k=(10^#t-1)\n*n, sum(j=1, #t, (t[j]-48)!)==n&return(k)))} \\ M. F. Hasler, Jun 20 2011
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|