OFFSET
1,1
LINKS
Eric Weisstein's World of Mathematics, Octagonal Number
Eric Weisstein's World of Mathematics, Prime Number
FORMULA
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