login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A002407 Cuban primes: primes which are the difference of two consecutive cubes.
(Formerly M4363 N1828)
31
7, 19, 37, 61, 127, 271, 331, 397, 547, 631, 919, 1657, 1801, 1951, 2269, 2437, 2791, 3169, 3571, 4219, 4447, 5167, 5419, 6211, 7057, 7351, 8269, 9241, 10267, 11719, 12097, 13267, 13669, 16651, 19441, 19927, 22447, 23497, 24571, 25117, 26227, 27361, 33391 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Primes of the form p = (x^3 - y^3)/(x - y) where x=y+1. See A007645 for generalization. I first saw the name "cuban prime" in Cunningham (1923). Values of x are in A002504 and y are in A111251. - N. J. A. Sloane, Jan 29 2013
Prime hex numbers (cf. A003215).
Equivalently, primes of the form p=1+3k(k+1) (and then k=floor(sqrt(p/3))). Also: primes p such that n^2(p+n) is a cube for some n>0. - M. F. Hasler, Nov 28 2007
Primes p such that 4p = 1+3s^2 for some integer s (A121259). - Michael Somos, Sep 15 2005
This sequence is believed to be infinite. - N. J. A. Sloane, May 07 2020
REFERENCES
Allan Joseph Champneys Cunningham, On quasi-Mersennian numbers, Mess. Math., 41 (1912), 119-146.
Allan Joseph Champneys Cunningham, Binomial Factorisations, Vols. 1-9, Hodgson, London, 1923-1929; see Vol. 1, pp. 245-259.
J.-M. De Koninck & A. Mercier, 1001 Problèmes en Théorie Classique des Nombres, Problem 241 pp. 39; 179, Ellipses Paris 2004.
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
David A. Corneth, Table of n, a(n) for n = 1..10000 (first 1000 terms from T. D. Noe)
A. J. C. Cunningham, On quasi-Mersennian numbers, Mess. Math., 41 (1912), 119-146. [Annotated scan of page 144 only]
A. J. C. Cunningham, Binomial Factorisations, Vols. 1-9, Hodgson, London, 1923-1929. [Annotated scans of a few pages from Volumes 1 and 2]
G. L. Honaker, Jr., Prime curio for 127
Michael Penn, Nearly cubic primes., YouTube video, 2023.
Eric Weisstein's World of Mathematics, Cuban Prime
Wikipedia, Cuban prime
FORMULA
a(n) = 6*A000217(A111251(n)) + 1. - Christopher Hohl, Jul 01 2019
From Rémi Guillaume, Nov 07 2023: (Start)
a(n) = A003215(A111251(n)).
a(n) = (3*(2*A002504(n) - 1)^2 + 1)/4.
a(n) = (3*A121259(n)^2 + 1)/4.
a(n) = prime(A145203(n)). (End)
EXAMPLE
a(1) = 7 = 1+3k(k+1) (with k=1) is the smallest prime of this form.
a(10^5) = 1792617147127 since this is the 100000th prime of this form.
MATHEMATICA
lst={}; Do[If[PrimeQ[p=(n+1)^3-n^3], (*Print[p]; *)AppendTo[lst, p]], {n, 10^2}]; lst (* Vladimir Joseph Stephan Orlovsky, Aug 21 2008 *)
Select[Table[3x^2+3x+1, {x, 100}], PrimeQ] (* or *) Select[Last[#]- First[#]&/@ Partition[Range[100]^3, 2, 1], PrimeQ] (* Harvey P. Dale, Mar 10 2012 *)
Select[Differences[Range[100]^3], PrimeQ] (* Harvey P. Dale, Jan 19 2020 *)
PROG
(PARI) {a(n)= local(m, c); if(n<1, 0, c=0; m=1; while( c<n, m++; if( isprime(m) && issquare((4*m-1)/3), c++)); m)} /* Michael Somos, Sep 15 2005 */
(PARI)
A002407(n, k=1)=until(isprime(3*k*k+++1) && !n--, ); 3*k*k--+1
list_A2407(Nmax)=for(k=1, sqrt(Nmax/3), isprime(t=3*k*(k+1)+1) && print1(t", ")) \\ M. F. Hasler, Nov 28 2007
(Magma) [a: n in [0..100] | IsPrime(a) where a is (3*n^2+3*n+1)]; // Vincenzo Librandi, Jan 20 2020
(Python)
from sympy import isprime
def aupto(limit):
alst, k, d = [], 1, 7
while d <= limit:
if isprime(d): alst.append(d)
k += 1; d = 1+3*k*(k+1)
return alst
print(aupto(34000)) # Michael S. Branicky, Jul 19 2021
CROSSREFS
Cf. A002648 (with x=y+2), A003627, A007645, A201477, A334520.
Sequence in context: A003215 A308685 A133323 * A098484 A155443 A155405
KEYWORD
nonn,easy,nice
AUTHOR
EXTENSIONS
More terms from James A. Sellers, Aug 08 2000
Entry revised by N. J. A. Sloane, Jan 29 2013
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 19 03:33 EDT 2024. Contains 370952 sequences. (Running on oeis4.)