OFFSET
0,3
COMMENTS
Presumably, lim_{n->oo} a(n)/A008906(n!) = 9/2.
FORMULA
EXAMPLE
a(0) = digitsum((0!)!) = digitsum(1!) = digitsum(1) = 1.
a(1) = digitsum((1!)!) = digitsum(1!) = digitsum(1) = 1.
a(2) = digitsum((2!)!) = digitsum(2!) = digitsum(2) = 2.
a(3) = digitsum((3!)!) = digitsum(6!) = digitsum(720) = 7+2 = 9.
a(4) = digitsum((4!)!) = digitsum(24!) = digitsum(620448401733239439360000) = 6+2+0+4+4+8+4+0+1+7+3+3+2+3+9+4+3+9+3+6+0+0+0+0 = 81.
MAPLE
a:= n-> add(i, i=convert(n!!, base, 10)):
seq(a(n), n=0..8); # Alois P. Heinz, Oct 27 2021
MATHEMATICA
Table[Plus@@IntegerDigits[(n!)!], {n, 0, 10}] (* Vincenzo Librandi, Mar 29 2018 *)
PROG
(PARI) a(n) = sumdigits(n!!); \\ Michel Marcus, Mar 28 2018
(Magma) [&+Intseq(Factorial(Factorial(n))): n in [0..10]]; // Vincenzo Librandi, Mar 29 2018
(Python)
from math import factorial
def A301861(n):
return sum(int(d) for d in str(factorial(factorial(n)))) # Chai Wah Wu, Mar 31 2018
# faster program for larger values of n
from gmpy2 import mpz, digits, fac
def A301861(n): return int(sum(mpz(d) for d in digits(fac(fac(n))))) # Chai Wah Wu, Oct 24 2021
CROSSREFS
KEYWORD
nonn,base,hard,more
AUTHOR
Jon E. Schoenfield, Mar 28 2018
EXTENSIONS
a(11) from Chai Wah Wu, Mar 31 2018
a(12) from Chai Wah Wu, Apr 01 2018
STATUS
approved