OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
Wikipedia, Centered heptagonal twin prime numbers
EXAMPLE
43 is a term since it is centered heptagonal and the greater member of the twin primes pair (41, 43).
71 is a term since it is centered heptagonal and the lesser member of the twin primes pair (71, 73).
MATHEMATICA
TwinPrimeQ[n_]:=If[PrimeQ[n], If[PrimeQ[n-2]||PrimeQ[n+2], True, False], False](*TwinPrimeQ*) lst={}; Do[p=(7*n^2-7*n+2)/2; If[TwinPrimeQ[p], AppendTo[lst, p]], {n, 2*6!}]; lst
PROG
(Magma) [a:k in [1..510]|IsPrime(a) and (IsPrime(a-2) or IsPrime(a+2)) where a is (7*k^2-7*k+2) div 2]; // Marius A. Burtea, Jan 30 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, Sep 27 2008
STATUS
approved