OFFSET
0,1
COMMENTS
Reversed digits of 10-adic sum of all factorials.
More generally, the 10-adic sum: B(n) = Sum_{k>=0} k^n*k! is given by: B(n) = A014182(n)*B(0) + A014619(n) for n>=0, where B(0) is the 10-adic sum of factorials (this constant). - Paul D. Hanna, Aug 12 2006
LINKS
EXAMPLE
!20 = 256132749111820314, !30 = 16158688114800553828940314 ... .
MATHEMATICA
a[n_] := Module[{x, f=1}, While[Mod[f!, 10^(n+1)]>0, f += 1]; x = Sum[ Mod[k!, 10^(n+1)], {k, 0, f}]; Quotient[10*Mod[x, 10^(n+1)], 10^(n+1)]]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Nov 18 2015, after Paul D. Hanna *)
PROG
(PARI) {a(n)=local(x, f=1); while(f!%10^(n+1)>0, f+=1); x=sum(k=0, f, k!%10^(n+1)); (10*(x%10^(n+1)))\10^(n+1)} \\ Paul D. Hanna, Aug 12 2006
CROSSREFS
KEYWORD
nonn,base,nice
AUTHOR
STATUS
approved