login
Sum of all the primes raised to their corresponding powers.
6

%I #17 May 11 2019 15:59:54

%S 2,11,136,2537,163588,4990397,415329070,17398892111,1818551553574,

%T 422525784853775,25831002681258606,6608783008521293887,

%U 931711885323534923208,74817069229462038688657

%N Sum of all the primes raised to their corresponding powers.

%H Robert Israel, <a href="/A087480/b087480.txt">Table of n, a(n) for n = 1..299</a>

%F a(n) = a(n-1) + prime(n)^n where prime(n) is the n-th prime.

%e a(4) = 2^1 + 3^2 + 5^3 + 7^4 = 2 + 9 + 125 + 2401 = 2537.

%p ListTools:-PartialSums( [seq(ithprime(i)^i, i=1..100)]); # _Robert Israel_, Nov 09 2015

%t a[1] = 2; a[n_] := a[n - 1] + Prime[n]^n; Table[a[n], {n, 15}] (* _Carlos Eduardo Olivieri_, Nov 09 2015 *)

%t Accumulate[Table[Prime[n]^n,{n,20}]] (* _Harvey P. Dale_, May 11 2019 *)

%o (PARI) a(n) = sum(i=1, n, prime(i)^i); \\ _Michel Marcus_, Sep 05 2013

%Y Partial sums of A062457.

%K easy,nonn

%O 1,1

%A Andy Edwards (AndynGen(AT)aol.com), Sep 09 2003

%E Corrected and extended by _Ray Chandler_, Sep 14 2003