login
A346494
Heptagonal numbers (A000566) with prime indices (A000040).
1
7, 18, 55, 112, 286, 403, 697, 874, 1288, 2059, 2356, 3367, 4141, 4558, 5452, 6943, 8614, 9211, 11122, 12496, 13213, 15484, 17098, 19669, 23377, 25351, 26368, 28462, 29539, 31753, 40132, 42706, 46717, 48094, 55279, 56776, 61387, 66178, 69472, 74563, 79834
OFFSET
1,1
FORMULA
a(n) = A000566(A000040(n)) = prime(n)*(5*prime(n)-3)/2.
EXAMPLE
a(1) = Heptagonal(prime(1)) = A000566(2) = 2*(5*2-3)/2 = 7;
a(2) = Heptagonal(prime(2)) = A000566(3) = 3*(5*3-3)/2 = 18;
a(3) = Heptagonal(prime(3)) = A000566(5) = 5*(5*5-3)/2 = 55.
MATHEMATICA
A346494[n_] := PolygonalNumber[7, Prime[n]]; Table[A346494[n], {n, 1, 41}] (* Robert P. P. McKone, Aug 22 2021 *)
PROG
(Sage)
A = [int(p*(5*p-3)/2) for p in range(0, 10^3) if p in Primes()]
(Python)
from sympy import primerange
print([p*(5*p-3)//2 for p in primerange(1, 180)]) # Michael S. Branicky, Aug 22 2021
(PARI) a(n) = my(p=prime(n)); p*(5*p-3)/2; \\ Michel Marcus, Sep 16 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Dumitru Damian, Aug 22 2021
STATUS
approved