OFFSET
1,2
COMMENTS
That is, positive integers k such that (k+1)^3 - k^3 is prime.
The Hardy-Littlewood constant 1.68109913... of this polynomial is approximately half that of the well-known Euler polynomial A221712, i.e., in comparison, only about half as many prime numbers are produced asymptotically as with k^2 + k + 41. - Hugo Pfoertner, Feb 10 2020
The primes that are obtained are called cuban primes and are in A002407. - Bernard Schott, Feb 13 2020
LINKS
Daniel Starodubtsev, Table of n, a(n) for n = 1..10000 (terms 1..1965 from Pierre CAMI)
FORMULA
a(n) = floor(sqrt(A002407(n)/3)). - Rémi Guillaume, Oct 16 2023
a(n) = A002504(n) - 1. - Rémi Guillaume, Oct 21 2023
a(n) = (A121259(n) - 1)/2. - Rémi Guillaume, Dec 29 2023
EXAMPLE
For k=52, 3*52^2 + 3*52 + 1 = 8269 is prime, so 52 is a term.
MATHEMATICA
Select[Range[200], PrimeQ[3#^2+3#+1]&] (* Harvey P. Dale, May 29 2017 *)
PROG
(PARI) for(n=0, 250, if(isprime(3*n^2+3*n+1), print1(n, ", ")))
(Magma) [k: k in [1..180] | IsPrime(3*k^2 + 3*k + 1)]; // Marius A. Burtea, Feb 10 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Parthasarathy Nambi, Oct 31 2005
EXTENSIONS
Extended by Lambert Klasen (lambert.klasen(AT)gmx.net), Nov 02 2005
STATUS
approved