login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A267144
Octagonal numbers with prime indices.
2
8, 21, 65, 133, 341, 481, 833, 1045, 1541, 2465, 2821, 4033, 4961, 5461, 6533, 8321, 10325, 11041, 13333, 14981, 15841, 18565, 20501, 23585, 28033, 30401, 31621, 34133, 35425, 38081, 48133, 51221, 56033, 57685, 66305, 68101, 73633, 79381, 83333, 89441, 95765
OFFSET
1,1
LINKS
Eric Weisstein's World of Mathematics, Octagonal Number
Eric Weisstein's World of Mathematics, Prime Number
FORMULA
a(n) = prime(n)*(3*prime(n) - 2) = A000040(n)*(3*A000040(n) - 2).
a(n) = A000567(A000040(n)).
a(n) = sigma_0(24^(prime(n) - 1)) = A000005(A009968(A000040(n) - 1)).
MATHEMATICA
Table[Prime[n] (3 Prime[n] - 2), {n, 1, 45}]
PROG
(PARI) lista(nn) = forprime(p=2, nn, print1(p*(3*p-2), ", ")); \\ Altug Alkan, Jan 11 2016
(Magma) [NthPrime(n)*(3*NthPrime(n)-2): n in [1..50]]; // Vincenzo Librandi, Jan 12 2016
(Python)
from sympy import prime
def a(n): p = prime(n); return p*(3*p-2)
print([a(n) for n in range(1, 42)]) # Michael S. Branicky, Aug 21 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ilya Gutkovskiy, Jan 11 2016
STATUS
approved