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

A007645 Generalized cuban primes: primes of the form x^2 + xy + y^2; or primes of the form x^2 + 3*y^2; or primes == 0 or 1 (mod 3).

Original entry on oeis.org

3, 7, 13, 19, 31, 37, 43, 61, 67, 73, 79, 97, 103, 109, 127, 139, 151, 157, 163, 181, 193, 199, 211, 223, 229, 241, 271, 277, 283, 307, 313, 331, 337, 349, 367, 373, 379, 397, 409, 421, 433, 439, 457, 463, 487, 499, 523, 541, 547, 571, 577, 601, 607, 613
Offset: 1

Views

Author

Keywords

Comments

Also, odd primes p such that -3 is a square mod p. - N. J. A. Sloane, Dec 25 2017
Equivalently, primes of the form p = (x^3 - y^3)/(x - y). If x=y+1 we get the cuban primes A002407, which is therefore a subsequence.
These are not to be confused with the Eisenstein primes, which are the primes in the ring of integers Z[w], where w = (-1+sqrt(-3))/2. The present sequence gives the rational primes which are also Eisenstein primes. - N. J. A. Sloane, Feb 06 2008
Also primes of the form x^2+3y^2 and, except for 3, x^2+xy+7y^2. See A140633. - T. D. Noe, May 19 2008
Conjecture: this sequence is Union(A002383,A162471). - Daniel Tisdale, Jul 04 2009
Primes p such that antiharmonic mean B(p) of the numbers k < p such that gcd(k, p) = 1 is not integer, where B(p) = A053818(p) / A023896(p) = A175505(p) / A175506(p) = (2p - 1) / 3. Primes p such that A175506(p) > 1. Subsequence of A179872. Union a(n) + A179891 = A179872. Example: a(6) = 37 because B(37) = A053818(37) / A023896(37) = A175505(37) / A175506(37) = 16206 / 666 = 73 / 3 (not integer). Cf. A179871, A179872, A179873, A179874, A179875, A179876, A179877, A179878, A179879, A179880, A179882, A179883, A179884, A179885, A179886, A179887, A179890, A179891, A003627, A034934. - Jaroslav Krizek, Aug 01 2010
Subsequence of Loeschian numbers, cf. A003136 and A024614; A088534(a(n)) > 0. - Reinhard Zumkeller, Oct 30 2011
Primes such that there exist a unique x, y, with 1 < x <= y < p, x + y == 1 (mod p) and x * y == 1 (mod p). - Jon Perry, Feb 02 2014
The prime factors of A002061. - Richard R. Forberg, Dec 10 2014
This sequence gives the primes p which solve s^2 == -3 (mod 4*p) (see Buell, Proposition 4.1., p. 50, for Delta = -3). p = 2 is not a solution. x^2 == -3 (mod 4) has solutions for all odd x. x^2 == -3 (mod p) has for odd primes p, not 3, the solutions of Legendre(-3|p) = +1 which are p == {1, 7} (mod 12). For p = 3 the representative solution is x = 0. Hence the solution of s^2 == -3 (mod 4*p) are the odd primes p = 3 and p == {1, 7} (mod 12) (or the primes p = 0, 1 (mod 3)). - Wolfdieter Lang, May 22 2021

References

  • D. A. Buell, Binary Quadratic Forms. Springer-Verlag, NY, 1989, p. 50.
  • Conway, J. H. and Guy, R. K. The Book of Numbers. New York: Springer-Verlag, pp. 220-223, 1996.
  • David A. Cox, "Primes of the Form x^2 + n y^2", Wiley, 1989, p. 7.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • Wagon, S. "Eisenstein Primes." Section 9.8 in Mathematica in Action. New York: W. H. Freeman, pp. 319-323, 1991.

Crossrefs

Subsequence of A003136.
Subsequences include A002407, A002648, and A201477.
Apart from initial term, same as A045331.
Cf. A001479, A001480 (x and y such that a(n) = x^2 + 3y^2).
Primes in A003136 and A034017.

Programs

  • Haskell
    a007645 n = a007645_list !! (n-1)
    a007645_list = filter ((== 1) . a010051) $ tail a003136_list
    -- Reinhard Zumkeller, Jul 11 2013, Oct 30 2011
  • Maple
    select(isprime,[3, seq(6*k+1, k=1..1000)]); # Robert Israel, Dec 12 2014
  • Mathematica
    Join[{3},Select[Prime[Range[150]],Mod[#,3]==1&]] (* Harvey P. Dale, Aug 21 2021 *)
  • PARI
    forprime(p=2,1e3,if(p%3<2,print1(p", "))) \\ Charles R Greathouse IV, Jun 16 2011
    

Formula

p == 0 or 1 (mod 3).
{3} UNION A002476. - R. J. Mathar, Oct 28 2008

Extensions

Entry revised by N. J. A. Sloane, Jan 29 2013

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

A111052 Numbers m such that 3*m^2 + 4 is prime.

Original entry on oeis.org

1, 3, 5, 7, 11, 19, 21, 25, 31, 33, 37, 39, 45, 49, 53, 73, 75, 77, 81, 89, 91, 93, 107, 115, 119, 129, 131, 135, 137, 145, 157, 185, 187, 193, 203, 205, 207, 213, 215, 221, 227, 229, 231, 249, 259, 261, 263, 271, 283, 291, 297, 299, 301, 317, 325, 327, 331
Offset: 1

Views

Author

Parthasarathy Nambi, Oct 06 2005

Keywords

Examples

			If m=77 then 3*m^2 + 4 = 17791 (prime).
		

Crossrefs

Cf. A201477.

Programs

  • Magma
    [n: n in [1..350] | IsPrime(3*n^2+4)]; // Vincenzo Librandi, Feb 06 2016
  • Mathematica
    Select[Range[340], PrimeQ[3*#^2 + 4] &] (* Stefan Steinerberger, Feb 26 2006 *)
  • PARI
    lista(nn) = {for(n=1, nn, if(ispseudoprime(3*n^2 + 4), print1(n, ", ")));} \\ Altug Alkan, Feb 05 2016
    

Formula

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

Extensions

More terms from Stefan Steinerberger, Feb 26 2006
Showing 1-3 of 3 results.