OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..299
FORMULA
a(n) = a(n-1) + prime(n)^n where prime(n) is the n-th prime.
EXAMPLE
a(4) = 2^1 + 3^2 + 5^3 + 7^4 = 2 + 9 + 125 + 2401 = 2537.
MAPLE
ListTools:-PartialSums( [seq(ithprime(i)^i, i=1..100)]); # Robert Israel, Nov 09 2015
MATHEMATICA
a[1] = 2; a[n_] := a[n - 1] + Prime[n]^n; Table[a[n], {n, 15}] (* Carlos Eduardo Olivieri, Nov 09 2015 *)
Accumulate[Table[Prime[n]^n, {n, 20}]] (* Harvey P. Dale, May 11 2019 *)
PROG
(PARI) a(n) = sum(i=1, n, prime(i)^i); \\ Michel Marcus, Sep 05 2013
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Andy Edwards (AndynGen(AT)aol.com), Sep 09 2003
EXTENSIONS
Corrected and extended by Ray Chandler, Sep 14 2003
STATUS
approved