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.

Showing 1-6 of 6 results.

A002407 Cuban primes: primes which are the difference of two consecutive cubes.

Original entry on oeis.org

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
Offset: 1

Views

Author

Keywords

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

Examples

			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.
		

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).

Crossrefs

Programs

  • Magma
    [a: n in [0..100] | IsPrime(a) where a is (3*n^2+3*n+1)]; // Vincenzo Librandi, Jan 20 2020
    
  • Mathematica
    lst={}; Do[If[PrimeQ[p=(n+1)^3-n^3], 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 *)
  • PARI
    {a(n)= local(m, c); if(n<1, 0, c=0; m=1; while( cMichael 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
    
  • 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

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)

Extensions

More terms from James Sellers, Aug 08 2000
Entry revised by N. J. A. Sloane, Jan 29 2013

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

A002504 Numbers x such that 1 + 3*x*(x-1) is a ("cuban") prime (cf. A002407).

Original entry on oeis.org

2, 3, 4, 5, 7, 10, 11, 12, 14, 15, 18, 24, 25, 26, 28, 29, 31, 33, 35, 38, 39, 42, 43, 46, 49, 50, 53, 56, 59, 63, 64, 67, 68, 75, 81, 82, 87, 89, 91, 92, 94, 96, 106, 109, 120, 124, 126, 129, 130, 137, 141, 143, 148, 154, 157, 158, 159, 165, 166, 171, 172
Offset: 1

Views

Author

Keywords

Comments

Equivalently, positive integers x such that x^3 - (x-1)^3 is prime. - Rémi Guillaume, Oct 24 2023

Examples

			From _Rémi Guillaume_, Dec 07 2023: (Start)
1 + 3*7*6 = 127 = A002407(5) is the 5th prime of this form, so a(5) = 7.
1 + 3*10*9 = 271 = A002407(6) is the 6th prime of this form, so a(6) = 10.
(End)
		

References

  • A. J. C. Cunningham, On quasi-Mersennian numbers, Mess. Math., 41 (1912), 119-146.
  • 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).

Crossrefs

Cf. A002407 (resulting primes), A111251, A121259.

Programs

  • Mathematica
    Select[Range[500], PrimeQ[1 + 3 # (# - 1)] &] (* T. D. Noe, Jan 30 2013 *)
  • PARI
    for(k=1,999,isprime(3*k*(k-1)+1)&print1(k",")) \\ M. F. Hasler, Nov 28 2007

Formula

From Rémi Guillaume, Dec 07 2023: (Start)
a(n) = ceiling(sqrt(A002407(n)/3)).
a(n) = A111251(n) + 1.
a(n) = (A121259(n) + 1)/2. (End)

Extensions

Edited, updated (1 is no longer regarded as a prime) and extended by M. F. Hasler, Nov 28 2007

A111051 Numbers m such that 3*m^2 + 1 is prime.

Original entry on oeis.org

2, 6, 8, 12, 16, 20, 22, 26, 34, 36, 40, 58, 64, 68, 78, 82, 84, 86, 98, 112, 120, 126, 142, 146, 148, 152, 156, 160, 168, 188, 190, 194, 196, 208, 216, 218, 222, 238, 240, 244, 246, 254, 264, 272, 282, 286, 294, 300, 302, 306, 308, 316, 320, 330, 338, 344, 348
Offset: 1

Views

Author

Parthasarathy Nambi, Oct 06 2005

Keywords

Comments

The resulting primes are the generalized cuban primes of the form (x^3-y^3)/(x-y), x=y+2 (see A002648). - Jani Melik, Jul 18 2007

Examples

			1 + 3*2^2 = 13 = A002648(1) is the 1st prime of this form, so a(1) = 2.
1 + 3*6^2 = 109 = A002648(2) is the 2nd prime of this form, so a(2) = 6.
1 + 3*8^2 = 193 = A002648(3) is the 3rd prime of this form, so a(3) = 8.
If m=98 then 3*m^2 + 1 = 28813 = A002648(19) is prime (the 19th of this form), so 98 is a term (the 19th).
		

Crossrefs

Programs

  • Maple
    ts_kubpra_ind:=proc(n) local i, tren, ans; ans:=[ ]: for i from 0 to n do tren:=1+3*i^2: if (isprime(tren)='true') then ans:=[ op(ans),i ] fi od: RETURN(ans); end: ts_kubpra_ind(2000); # Jani Melik, Jul 18 2007
  • Mathematica
    Select[Range[400],PrimeQ[3#^2+1]&] (* Harvey P. Dale, Jul 17 2016 *)
  • PARI
    is(n)=isprime(3*n^2+1) \\ Charles R Greathouse IV, Feb 07 2017

Formula

a(n) = sqrt((A002648(n)-1)/3). - Zak Seidov, Feb 04 2016

Extensions

More terms from Jani Melik, Jul 18 2007
Edited by N. J. A. Sloane, Sep 28 2007

A120460 Primes p such that (3*p^2+1)/4 is prime.

Original entry on oeis.org

3, 5, 7, 13, 19, 23, 29, 47, 61, 83, 97, 127, 149, 163, 173, 181, 191, 211, 239, 251, 257, 281, 307, 313, 317, 331, 359, 373, 383, 419, 433, 439, 449, 467, 491, 503, 593, 607, 617, 631, 643, 701, 709, 719, 751, 797, 811, 839, 859, 883, 887, 937, 971, 1013, 1049
Offset: 1

Views

Author

Zak Seidov, Aug 25 2006

Keywords

Comments

Prime terms in A121259 = numbers n such that (3n^2+1)/4 is prime.

Crossrefs

Cf. A121259.

Programs

  • Mathematica
    Select[Prime[Range[200]],PrimeQ[(3#^2+1)/4]&] (* Harvey P. Dale, Apr 25 2017 *)

A377045 Number of partitions of cuban primes.

Original entry on oeis.org

15, 490, 21637, 1121505, 3913864295, 1131238503938606, 78801255302666615, 5589233202595404488, 29349508915133986374841, 2163909235608484556362424, 913865816485680423486405066750, 191623400974625892978847721669762887224010
Offset: 1

Views

Author

Paul F. Marrero Romero, Oct 14 2024

Keywords

Comments

Number of partitions of prime numbers that are the difference of two consecutive cubes.
Number of partitions of primes p such that p=(3*k^2 + 1)/4 for some integer k (A121259).

Crossrefs

Programs

  • Maple
    R:= NULL: count:= 0:
    for i from 1 while count < 30 do
      p:= (i+1)^3 - i^3;
      if isprime(p) then count:= count+1; v:= combinat:-numbpart(p); R:= R,v; fi
    od:
    R; # Robert Israel, Nov 14 2024
  • Mathematica
    PartitionsP[Select[Table[(3k^2 + 1)/4,{k,50}],PrimeQ]]

Formula

a(n) = A000041(A002407(n)).
a(n) = A000041((3*A121259(n)^2 + 1)/4).
Showing 1-6 of 6 results.