OFFSET
1,1
EXAMPLE
For n=3, p=5, a(n) = 5^2 + 5^3 + 5^5 = 25 + 125 + 3125 = 3275.
PROG
(PARI) a(n) = my(p=prime(n)); sum(k=1, n, p^prime(k)); \\ Michel Marcus, Dec 02 2021
(Python)
from sympy import prime, primerange
def a(n): pn = prime(n); return sum(pn**pk for pk in primerange(1, pn+1))
print([a(n) for n in range(1, 12)]) # Michael S. Branicky, Dec 02 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Firdous Ahmad Mala, Dec 02 2021
EXTENSIONS
More terms from Michel Marcus, Dec 02 2021
STATUS
approved