login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
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
Sequence in context: A343545 A324944 A084819 * A220031 A197092 A288743
KEYWORD
nonn,easy
AUTHOR
Dumitru Damian, Aug 22 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 04:56 EDT 2024. Contains 371767 sequences. (Running on oeis4.)