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-7 of 7 results.

A133431 Old-fashioned version of A002504 (the initial 1 should be omitted since 1 is no longer regarded as a prime, although it was in 1912).

Original entry on oeis.org

1, 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, 173, 176, 180, 185, 186, 187, 192, 194, 196, 197
Offset: 1

Views

Author

N. J. A. Sloane, Nov 28 2007

Keywords

References

  • A. J. C. Cunningham, On quasi-Mersennian numbers, Mess. Math., 41 (1912), 119-146.

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

A113478 Number of cuban primes less than 10^n.

Original entry on oeis.org

0, 1, 4, 11, 28, 64, 173, 438, 1200, 3325, 9289, 26494, 76483, 221530, 645685, 1895983, 5593440, 16578830, 49347768, 147402214, 441641536, 1326941536, 3996900895, 12066234206, 36501753353
Offset: 0

Views

Author

Eric W. Weisstein, Jan 10 2006

Keywords

Examples

			7, 19, 37, 61, 127 are the first few cuban primes, so a(1)=1 and a(2)=4.
		

Crossrefs

Programs

Extensions

a(15)-a(18) from Donovan Johnson, Feb 05 2010
a(19)-a(24) from Hiroaki Yamanouchi, Oct 08 2015

A121259 Numbers k such that (3*k^2 + 1)/4 is prime.

Original entry on oeis.org

3, 5, 7, 9, 13, 19, 21, 23, 27, 29, 35, 47, 49, 51, 55, 57, 61, 65, 69, 75, 77, 83, 85, 91, 97, 99, 105, 111, 117, 125, 127, 133, 135, 149, 161, 163, 173, 177, 181, 183, 187, 191, 211, 217, 239, 247, 251, 257, 259, 273, 281, 285, 295, 307, 313, 315, 317, 329, 331, 341
Offset: 1

Views

Author

Zak Seidov, Aug 23 2006

Keywords

Examples

			(3*5^2 + 1)/4 = 19 is the 2nd prime of this form, so a(2) = 5.
(3*13^2 + 1)/4 = 127 is the 5th prime of this form, so a(5) = 13.
(3*19^2 + 1)/4 = 271 is the 6th prime of this form, so a(6) = 19.
		

Crossrefs

Cf. comment by Michael Somos in A002407.
Cf. A002504, A111251, A111051 (simpler variant).

Programs

Formula

a(n) = sqrt((4*A002407(n) - 1)/3). [corrected by Rémi Guillaume, Dec 07 2023]
a(n) = 2*A002504(n) - 1. - Hugo Pfoertner, Oct 07 2023
a(n) = 2*A111251(n) + 1. - Rémi Guillaume, Dec 06 2023

A221794 Number of primes of the form (x+1)^3 - x^3 with x <= 10^n.

Original entry on oeis.org

1, 7, 42, 263, 1965, 15282, 126826
Offset: 0

Views

Author

Vladimir Pletser, Jan 25 2013

Keywords

Comments

Cuban primes are primes that are the difference of two consecutive cubes, p = (x+1)^3 - x^3 (A002407). They are also primes of the form 3k(k+1) + 1, where values for k+1 are in A002504.

Crossrefs

Cf. A002407, A002504, A003215, A113478 (number of cuban primes < 10^n).

A066486 a(n) = min( x : x^3 + n^3 == 0 mod (x+n-1) ).

Original entry on oeis.org

1, 6, 17, 34, 57, 2, 121, 6, 23, 262, 321, 386, 55, 534, 617, 88, 3, 902, 61, 144, 77, 52, 9, 1634, 1777, 1926, 17, 2242, 2409, 344, 2761, 198, 3137, 4, 3537, 164, 535, 4182, 4409, 112, 93, 5126, 5377, 768, 413, 6166, 453, 920, 7009, 7302, 1043, 22, 8217, 224, 13, 9186, 5, 34, 10209, 188, 19, 1560, 11657
Offset: 1

Views

Author

Benoit Cloitre, Jan 02 2002

Keywords

Crossrefs

Cf. A066333.

Programs

  • Mathematica
    a[n_] := For[x = 1, True, x++, If[Mod[x^3 + n^3, x + n - 1] == 0, Return[x]]]; Array[a, 24] (* Jean-François Alcover, Feb 17 2018 *)
  • PARI
    a(n) = {my(k=1); while((k^3+n^3)%(k+n-1) != 0, k++); k; } \\ Altug Alkan, Feb 17 2018

Formula

a(n) = 3*n^2 - 4*n + 2 for n=1, 2, 3, 4, 5, 7, 10, 11, 12, 14, 15, 18, 24, 25, 26, 28, 29, 31, 33, 35, 38, ...
That is, in those cases a(n) = A056109(n-1). It appears that the corresponding indices are given by A133431 (i.e., 1 U A002504). - Michel Marcus, Feb 17 2018

Extensions

More terms from Altug Alkan, Feb 17 2018
Showing 1-7 of 7 results.