login
A202358
Sum of digits of n^(n!).
1
0, 1, 4, 18, 73, 334, 2592, 18919, 164476, 1558521, 1, 187044031, 2326111614, 31214008090
OFFSET
0,3
COMMENTS
a(10^k) = 1. - Chai Wah Wu, Dec 18 2019
FORMULA
a(n) = A007953(A053986(n)). - Michel Marcus, Aug 22 2013
EXAMPLE
a(3) = 18 because 3^3! = 729 with digit sum 7+2+9 = 18.
MAPLE
ds:= proc(n) local r;
`if`(n<10, n, ds(iquo(n, 10^iquo(length(n), 2), 'r'))+ds(r))
end:
a:= n-> ds(n^n!):
seq(a(n), n=0..10); # Alois P. Heinz, Dec 17 2011
PROG
(Python)
from math import factorial
def a(n): return sum(map(int, str(n**(factorial(n)))))
print([a(n) for n in range(10)]) # Michael S. Branicky, Jan 28 2021
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Jacques ALARDET, Dec 17 2011
EXTENSIONS
a(11)-a(12) from Lars Blomberg, Jan 18 2013
a(13) from Chai Wah Wu, Oct 25 2021
STATUS
approved