|
|
A285791
|
|
Primes equal to a heptagonal number plus 1.
|
|
4
|
|
|
2, 19, 113, 149, 541, 617, 971, 1289, 1783, 2357, 3011, 3187, 5689, 6427, 7481, 7757, 9829, 12497, 12853, 14327, 15881, 17099, 18793, 21023, 24851, 28463, 30637, 31193, 45361, 50909, 54539, 60607, 63761, 66179, 69473, 70309, 83449, 88079, 90917, 91873, 94771
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
PROG
|
(PARI) pg(m, n) = (n^2*(m-2)-n*(m-4))/2 \\ n-th m-gonal number
maxk=300; L=List(); for(k=1, maxk, if(isprime(p=pg(7, k) + 1), listput(L, p))); Vec(L)
(Python)
from sympy import isprime
def heptagonal(n): return n*(5*n-3)//2
def aupto(limit):
alst, n, hn = [], 1, heptagonal(1)
while hn < limit:
if isprime(hn+1): alst.append(hn+1)
n, hn = n+1, heptagonal(n+1)
return alst
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|