A066588 a(n) = sum of the digits of n^n.
1, 1, 4, 9, 13, 11, 27, 25, 37, 45, 1, 41, 54, 58, 52, 99, 88, 98, 108, 127, 31, 117, 148, 146, 153, 151, 154, 189, 163, 167, 63, 184, 205, 207, 214, 260, 270, 271, 265, 306, 112, 308, 315, 313, 325, 306, 352, 374, 333, 355, 151, 414, 412, 350, 378, 442, 391, 450
Offset: 0
Examples
a(7) = 25 because 7^7 = 823543 and 8 + 2 + 3 + 5 + 4 + 3 = 25.
Links
- Harry J. Smith, Table of n, a(n) for n = 0..1000
Programs
-
Magma
[&+Intseq((n^n)): n in [0..80] ]; // Vincenzo Librandi, Jun 18 2015
-
Maple
a:= n-> add(i, i=convert(n^n, base, 10)): seq(a(n), n=0..60); # Alois P. Heinz, Oct 06 2023
-
Mathematica
Table[Plus@@IntegerDigits@(n^n), {n, 80}] (* Vincenzo Librandi, Jun 18 2015 *)
-
PARI
a(n) = sumdigits(n^n) \\ Michel Marcus, Jun 18 2015
Extensions
More terms from Paolo P. Lava, May 15 2007
a(0)=1 inserted by Sean A. Irvine, Oct 06 2023