A202358 Sum of digits of n^(n!).
0, 1, 4, 18, 73, 334, 2592, 18919, 164476, 1558521, 1, 187044031, 2326111614, 31214008090
Offset: 0
Examples
a(3) = 18 because 3^3! = 729 with digit sum 7+2+9 = 18.
Programs
-
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
-
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
Formula
Extensions
a(11)-a(12) from Lars Blomberg, Jan 18 2013
a(13) from Chai Wah Wu, Oct 25 2021
Comments