cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A111251 Numbers k such that 3*k^2 + 3*k + 1 is prime.

Original entry on oeis.org

1, 2, 3, 4, 6, 9, 10, 11, 13, 14, 17, 23, 24, 25, 27, 28, 30, 32, 34, 37, 38, 41, 42, 45, 48, 49, 52, 55, 58, 62, 63, 66, 67, 74, 80, 81, 86, 88, 90, 91, 93, 95, 105, 108, 119, 123, 125, 128, 129, 136, 140, 142, 147, 153, 156, 157, 158, 164, 165, 170, 171, 172, 175
Offset: 1

Views

Author

Parthasarathy Nambi, Oct 31 2005

Keywords

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

Examples

			For k=52, 3*52^2 + 3*52 + 1 = 8269 is prime, so 52 is a term.
		

Crossrefs

Cf. A221712, A002407 (resulting primes), A002504, A121259.

Programs

  • Magma
    [k: k in [1..180] | IsPrime(3*k^2 + 3*k + 1)]; // Marius A. Burtea, Feb 10 2020
  • Mathematica
    Select[Range[200],PrimeQ[3#^2+3#+1]&] (* Harvey P. Dale, May 29 2017 *)
  • PARI
    for(n=0,250,if(isprime(3*n^2+3*n+1),print1(n,",")))
    

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

Extensions

Extended by Lambert Klasen (lambert.klasen(AT)gmx.net), Nov 02 2005