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-10 of 252 results. Next

A106856 Primes of the form x^2 + xy + 2y^2, with x and y nonnegative.

Original entry on oeis.org

2, 11, 23, 37, 43, 53, 71, 79, 107, 109, 127, 137, 149, 151, 163, 193, 197, 211, 233, 239, 263, 281, 317, 331, 337, 373, 389, 401, 421, 431, 443, 463, 487, 491, 499, 541, 547, 557, 569, 599, 613, 617, 641, 653, 659, 673, 683, 739, 743, 751, 757, 809, 821
Offset: 1

Views

Author

T. D. Noe, May 09 2005, Apr 28 2008

Keywords

Comments

Discriminant=-7. Binary quadratic forms ax^2 + bxy + cy^2 have discriminant d = b^2 - 4ac.
Consider sequences of primes produced by forms with -100
The Mathematica function QuadPrimes2 is useful for finding the primes less than "lim" represented by the positive definite quadratic form ax^2 + bxy + cy^2 for any a, b and c satisfying a>0, c>0, and discriminant d<0. It does this by examining all x>=0 and y>=0 in the ellipse ax^2 + bxy + cy^2 <= lim. To find the primes generated by positive and negative x and y, compute the union of QuadPrimes2[a,b,c,lim] and QuadPrimes2[a,-b,c,lim]. - T. D. Noe, Sep 01 2009
For other programs see the "Binary Quadratic Forms and OEIS" link.

References

  • David A. Cox, Primes of the Form x^2 + n y^2, Wiley, 1989.
  • L. E. Dickson, History of the Theory of Numbers, Vol. 3, Chelsea, 1923.

Crossrefs

Discriminants in the range -3 to -100: A007645 (d=-3), A002313 (d=-4), A045373, A106856 (d=-7), A033203 (d=-8), A056874, A106857 (d=-11), A002476 (d=-12), A033212, A106858-A106861 (d=-15), A002144, A002313 (d=-16), A106862-A106863 (d=-19), A033205, A106864-A106865 (d=-20), A106866-A106869 (d=-23), A033199, A084865 (d=-24), A002476, A106870 (d=-27), A033207 (d=-28), A033221, A106871-A106874 (d=-31), A007519, A007520, A106875-A106876 (d=-32), A106877-A106881 (d=-35), A040117, A068228, A106882 (d=-36), A033227, A106883-A106888 (d=-39), A033201, A106889 (d=-40), A106890-A106891 (d=-43), A033209, A106282, A106892-A106893 (d=-44), A033232, A106894-A106900 (d=-47), A068229 (d=-48), A106901-A106904 (d=-51), A033210, A106905-A106906 (d=-52), A033235, A106907-A106913 (d=-55), A033211, A106914-A106917 (d=-56), A106918-A106922 (d=-59), A033212, A106859 (d=-60), A106923-A106930 (d=-63), A007521, A106931 (d=-64), A106932-A106933 (d=-67), A033213, A106934-A106938 (d=-68), A033246, A106939-A106948 (d=-71), A106949-A106950 (d=-72), A033212, A106951-A106952 (d=-75), A033214, A106953-A106955 (d=-76), A033251, A106956-A106962 (d=-79), A047650, A106963-A106965 (d=-80), A106966-A106970 (d=-83), A033215, A102271, A102273, A106971-A106974 (d=-84), A033256, A106975-A106983 (d=-87), A033216, A106984 (d=-88), A106985-A106989 (d=-91), A033217 (d=-92), A033206, A106990-A107001 (d=-95), A107002-A107008 (d=-96), A107009-A107013 (d=-99).
Other collections of quadratic forms: A139643, A139827.
For a more comprehensive list of sequences giving numbers and/or primes represented by binary quadratic forms, see the "Binary Quadratic Forms and OEIS" link.
Cf. also A242660.

Programs

  • Mathematica
    QuadPrimes2[a_, b_, c_, lmt_] := Module[{p, d, lst = {}, xMax, yMax}, d = b^2 - 4a*c; If[a > 0 && c > 0 && d < 0, xMax = Sqrt[lmt/a]*(1+Abs[b]/Floor[Sqrt[-d]])]; Do[ If[ 4c*lmt + d*x^2 >= 0, yMax = ((-b)*x + Sqrt[4c*lmt + d*x^2])/(2c), yMax = 0 ]; Do[p = a*x^2 + b*x*y + c*y^2; If[ PrimeQ[ p]  && p <= lmt && !MemberQ[ lst, p], AppendTo[ lst, p]], {y, 0, yMax}], {x, 0, xMax}]; Sort[ lst]];
    QuadPrimes2[1, 1, 2, 1000]
    (This is a corrected version of the old, incorrect, program QuadPrimes. - N. J. A. Sloane, Jun 15 2014)
    max = 1000; Table[yy = {y, 1, Floor[Sqrt[8 max - 7 x^2]/4 - x/4]}; Table[ x^2 + x y + 2 y^2, yy // Evaluate], {x, 0, Floor[Sqrt[max]]}] // Flatten // Union // Select[#, PrimeQ]& (* Jean-François Alcover, Oct 04 2018 *)
  • PARI
    list(lim)=my(q=Qfb(1,1,2), v=List([2])); forprime(p=2, lim, if(vecmin(qfbsolve(q, p))>0, listput(v,p))); Vec(v) \\ Charles R Greathouse IV, Aug 05 2016

Extensions

Removed old Mathematica programs - T. D. Noe, Sep 09 2009
Edited (pointed out error in QuadPrimes, added new version of program, checked and extended b-file). - N. J. A. Sloane, Jun 06 2014

A140633 Primes of the form 7x^2+4xy+52y^2.

Original entry on oeis.org

7, 103, 127, 223, 367, 463, 487, 607, 727, 823, 967, 1063, 1087, 1303, 1327, 1423, 1447, 1543, 1567, 1663, 1783, 2143, 2287, 2383, 2503, 2647, 2767, 2887, 3343, 3463, 3583, 3607, 3727, 3823, 3847, 3943, 3967, 4327, 4423, 4447, 4567, 4663
Offset: 1

Author

T. D. Noe, May 19 2008

Keywords

Comments

Discriminant=-1440. Also primes of the forms 7x^2+6xy+87y^2 and 7x^2+2xy+103y^2.
Voight proves that there are exactly 69 equivalence classes of positive definite binary quadratic forms that represent almost the same primes. 48 of those quadratic forms are of the idoneal type discussed in A139827. The remaining 21 begin at A140613 and end here. The cross-references section lists the quadratic forms in the same order as tables 1-6 in Voight's paper. Note that A107169 and A139831 are in the same equivalence class.
In base 12, the sequence is 7, 87, X7, 167, 267, 327, 347, 427, 507, 587, 687, 747, 767, 907, 927, 9X7, X07, X87, XX7, E67, 1047, 12X7, 13X7, 1467, 1547, 1647, 1727, 1807, 1E27, 2007, 20X7, 2107, 21X7, 2267, 2287, 2347, 2367, 2607, 2687, 26X7, 2787, 2847, where X is for 10 and E is for 11. Moreover, the discriminant is X00 and that all elements are {7, 87, X7, 167, 187, 247} mod 260. - Walter Kehowski, May 31 2008

Programs

  • Mathematica
    Union[QuadPrimes2[7, 4, 52, 10000], QuadPrimes2[7, -4, 52, 10000]] (* see A106856 *)

A141373 Primes of the form 3*x^2+16*y^2. Also primes of the form 4*x^2+4*x*y-5*y^2 (as well as primes the form 4*x^2+12*x*y+3*y^2).

Original entry on oeis.org

3, 19, 43, 67, 139, 163, 211, 283, 307, 331, 379, 499, 523, 547, 571, 619, 643, 691, 739, 787, 811, 859, 883, 907, 1051, 1123, 1171, 1291, 1459, 1483, 1531, 1579, 1627, 1699, 1723, 1747, 1867, 1987, 2011, 2083, 2131, 2179, 2203, 2251, 2347, 2371, 2467, 2539
Offset: 1

Author

T. D. Noe, May 13 2005; Laura Caballero Fernandez, Lourdes Calvo Moguer, Maria Josefa Cano Marquez, Oscar Jesus Falcon Ganfornina and Sergio Garrido Morales (oscfalgan(AT)yahoo.es), Jun 28 2008

Keywords

Comments

The discriminant is -192 (or 96, or ...), depending on which quadratic form is used for the definition. Binary quadratic forms a*x^2+b*x*y+c*y^2 have discriminant d=b^2-4ac and gcd(a,b,c)=1. See A107132 for more information.
Except for 3, also primes of the forms 4x^2 + 4xy + 19y^2 and 16x^2 + 8xy + 19y^2. See A140633. - T. D. Noe, May 19 2008

Examples

			19 is a member because we can write 19=4*2^2+4*2*1-5*1^2 (or 19=4*1^2+12*1*1+3*1^2).
		

References

  • Z. I. Borevich and I. R. Shafarevich, Number Theory.

Crossrefs

See also A038872 (d=5),
A038873 (d=8),
A068228, A141123 (d=12),
A038883 (d=13),
A038889 (d=17),
A141158 (d=20),
A141159, A141160 (d=21),
A141170, A141171 (d=24),
A141172, A141173 (d=28),
A141174, A141175 (d=32),
A141176, A141177 (d=33),
A141178 (d=37),
A141179, A141180 (d=40),
A141181 (d=41),
A141182, A141183 (d=44),
A033212, A141785 (d=45),
A068228, A141187 (d=48),
A141188 (d=52),
A141189 (d=53),
A141190, A141191 (d=56),
A141192, A141193 (d=57),
A141215 (d=61),
A141111, A141112 (d=65),
A141336, A141337 (d=92),
A141338, A141339 (d=93),
A141161, A141163 (d=148),
A141165, A141166 (d=229),

Programs

  • Magma
    [3] cat [ p: p in PrimesUpTo(3000) | p mod 24 in {19 } ]; // Vincenzo Librandi, Jul 24 2012
    
  • Mathematica
    QuadPrimes2[3, 0, 16, 10000] (* see A106856 *)
  • PARI
    list(lim)=my(v=List(),w,t); for(x=1, sqrtint(lim\3), w=3*x^2; for(y=0, sqrtint((lim-w)\16), if(isprime(t=w+16*y^2), listput(v,t)))); Set(v) \\ Charles R Greathouse IV, Feb 09 2017

Formula

Except for 3, the primes are congruent to 19 (mod 24). - T. D. Noe, May 02 2008

Extensions

More terms from Colin Barker, Apr 05 2015
Edited by N. J. A. Sloane, Jul 14 2019, combining two identical entries both with multiple cross-references.

A102273 Primes p such that Q(sqrt(-21p)) has genus characters chi_{-3} = -1, chi_{-7} = +1.

Original entry on oeis.org

11, 23, 71, 107, 179, 191, 239, 263, 347, 359, 431, 443, 491, 599, 659, 683, 743, 827, 863, 911, 947, 1019, 1031, 1103, 1163, 1187, 1283, 1367, 1439, 1451, 1499, 1523, 1583, 1607, 1619, 1667, 1787, 1871, 2003, 2027, 2039, 2087
Offset: 1

Author

N. J. A. Sloane, Feb 19 2005

Keywords

Comments

The 2-class number of these fields is always 4.
Primes of the form 2x^2 - 2xy + 11y^2 with x nonnegative and y positive. - T. D. Noe, May 08 2005
Also primes of the forms 8x^2 + 4xy + 11y^2 and 11x^2 + 2xy + 23y^2. See A140633. - T. D. Noe, May 19 2008
The discriminant of positive definite binary quadratic form (2,2,11) is -84. - Hugo Pfoertner, Jul 14 2019

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(3000) | p mod 84 in [2, 11, 23, 71]]; // Vincenzo Librandi, Jul 19 2012
  • Mathematica
    f[x_,y_]:=2*x^2+2*x*y+11*y^2; lst={};Do[Do[p=f[x,y];If[PrimeQ[p],AppendTo[lst,p]],{y,-5!,6!}],{x,-5!,6!}];Take[Union[lst],5! ] (* Vladimir Joseph Stephan Orlovsky, Jul 06 2009 *)

Formula

The primes are congruent to {2, 11, 23, 71} (mod 84). - T. D. Noe, May 02 2008

A106859 Primes of the form 2x^2 + xy + 2y^2.

Original entry on oeis.org

2, 3, 5, 17, 23, 47, 53, 83, 107, 113, 137, 167, 173, 197, 227, 233, 257, 263, 293, 317, 347, 353, 383, 443, 467, 503, 557, 563, 587, 593, 617, 647, 653, 677, 683, 743, 773, 797, 827, 857, 863, 887, 947, 953, 977, 983, 1013, 1097, 1103, 1163, 1187, 1193
Offset: 1

Author

T. D. Noe, May 09 2005

Keywords

Comments

Discriminant=-15.
If p is a prime >= 17 in this sequence then k==0 (mod 4) for all k satisfying "B(2k)(p^k-1) is an integer" where B are the Bernoulli numbers. - Benoit Cloitre, Nov 14 2005
Equals {2, 3, 5 and primes congruent to 17, 23 (mod 30)}; see A039949 and A132235. Except for 2, the same as primes of the form 3x^2 + 5y^2, which has discriminant -60. - T. D. Noe, May 02 2008
Equals {3, 5 and primes congruent to 2, 8 (mod 15)} sorted; see A033212. This form is in the only non-principal class (respectively, genus) for fundamental discriminant -15. - Rick L. Shepherd, Jul 25 2014 [See A343241 for the 2, 8 (mod 15) primes.]
From Wolfdieter Lang, Jun 08 2021: (Start)
Regarding the above comment of T. D. Noe on the form [3, 0, 5]: the class number h(-60) = 2 = A000003(15), and [1, 0, 15] is the principal reduced form, representing the primes given in A033212.
The form [3, 0, 5] represents the proper equivalence class of the second genus of forms of discriminant Disc = -60. The Legendre symbol for the odd primes, not 3 or 5, satisfy L(-3|p) = -1 and L(5|p) = -1, leading to primes p == {17, 23, 47, 53} (mod 60). See the Buell reference, p. 52, for the two characters L(p|3) and L(p|5). The prime 2 is represented by the imprimitive reduced form [2, 2, 8] of Disc = -60. (End)

References

  • D. A. Buell, Binary Quadratic Forms. Springer-Verlag, NY, 1989, pp. 51-52.

Programs

  • Mathematica
    QuadPrimes2[2, 1, 2, 100000] (* see A106856 *)
  • PARI
    { fc(a,b,c,M) = my(p,t1,t2,n); t1 = listcreate();
    for(n=1,M, p = prime(n);
    t2 = qfbsolve(Qfb(a,b,c),p); if(t2 == 0,, listput(t1,p)));
    print(t1);
    }
    fc(2,1,2,1000); \\ N. J. A. Sloane, Jun 06 2014

Extensions

Removed defective Mma program and extended the b-file using the PARI program fc. - N. J. A. Sloane, Jun 06 2014

A107181 Primes of the form 8x^2 + 9y^2.

Original entry on oeis.org

17, 41, 89, 113, 137, 233, 257, 281, 353, 401, 449, 521, 569, 593, 617, 641, 761, 809, 857, 881, 929, 953, 977, 1049, 1097, 1193, 1217, 1289, 1361, 1409, 1433, 1481, 1553, 1601, 1697, 1721, 1889, 1913, 2081, 2129, 2153, 2273, 2297, 2393, 2417
Offset: 1

Author

T. D. Noe, May 13 2005

Keywords

Comments

Discriminant = -288. See A107132 for more information.
Also primes of the form 9x^2 + 6xy + 17y^2. See A140633. - T. D. Noe, May 19 2008
All terms are of the form x^2 + y^2, see A002144. - Zak Seidov, Jan 26 2014

Crossrefs

Subsequence of A002144 (Pythagorean primes).
Cf. A139827.

Programs

  • Magma
    [ p: p in PrimesUpTo(5000) | p mod 24 eq 17 ]; // Vincenzo Librandi, Apr 19 2011
    
  • Mathematica
    QuadPrimes2[8, 0, 9, 10000] (* see A106856 *)
  • PARI
    list(lim)=my(v=List()); forprime(p=17,lim, if(p%24==17, listput(v,p))); Vec(v) \\ Charles R Greathouse IV, Feb 10 2017

Formula

The primes are congruent to 17 (mod 24). - T. D. Noe, May 02 2008

A102271 Primes of the form 3*x^2 + 7*y^2.

Original entry on oeis.org

3, 7, 19, 31, 103, 139, 199, 223, 271, 283, 307, 367, 439, 523, 607, 619, 643, 691, 727, 787, 811, 859, 1039, 1063, 1123, 1231, 1279, 1291, 1399, 1447, 1459, 1483, 1531, 1543, 1567, 1627, 1699, 1783, 1867, 1879, 1951, 1987, 2131, 2203, 2239, 2287, 2371, 2383
Offset: 1

Author

N. J. A. Sloane, Feb 19 2005

Keywords

Comments

Primes p such that Q(sqrt(-21p)) has genus characters chi_{-3} = +1, chi_{-7} = -1.

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(3000) | p mod 84 in [3, 7, 19, 31, 55]]; // Vincenzo Librandi, Jul 19 2012
    
  • Mathematica
    m=3; n=7; pLst={}; lim=3000; xMax=Sqrt[lim/m]; yMax=Sqrt[lim/n]; Do[p=m*x^2+n*y^2; If[pT. D. Noe, May 05 2005 *)
    QuadPrimes2[3, 0, 7, 10000] (* see A106856 *)
  • PARI
    list(lim)=my(v=List(),w,t); for(x=0, sqrtint(lim\3), w=3*x^2; for(y=0, sqrtint((lim-w)\7), if(isprime(t=w+7*y^2), listput(v,t)))); Set(v) \\ Charles R Greathouse IV, Feb 09 2017

Formula

The primes are congruent to {3, 7, 19, 31, 55} (mod 84). - T. D. Noe, May 02 2008

A107007 Primes of the form 3*x^2+8*y^2.

Original entry on oeis.org

3, 11, 59, 83, 107, 131, 179, 227, 251, 347, 419, 443, 467, 491, 563, 587, 659, 683, 827, 947, 971, 1019, 1091, 1163, 1187, 1259, 1283, 1307, 1427, 1451, 1499, 1523, 1571, 1619, 1667, 1787, 1811, 1907, 1931, 1979, 2003, 2027, 2099, 2243, 2267
Offset: 1

Author

T. D. Noe, May 09 2005

Keywords

Comments

Discriminant=-96.
Except for 3, also primes of the forms 8*x^2+8*x*y+11*y^2 and 11*x^2+6*x*y+27*y^2. See A140633. - T. D. Noe, May 19 2008
Except for the first member, 3, all the members seem to be terms of A123239 which are prime in both k(i) and k(rho). - A.K. Devaraj, Nov 24 2009

Crossrefs

Cf. A139827.

Programs

  • Magma
    [3] cat[ p: p in PrimesUpTo(3000) | p mod 24 in {11} ]; // Vincenzo Librandi, Jul 23 2012
  • Mathematica
    QuadPrimes2[3, 0, 8, 10000] (* see A106856 *)

Formula

Except for 3, the terms are congruent to 11 (mod 24). - T. D. Noe, May 02 2008

A084865 Primes of the form 2x^2 + 3y^2.

Original entry on oeis.org

2, 3, 5, 11, 29, 53, 59, 83, 101, 107, 131, 149, 173, 179, 197, 227, 251, 269, 293, 317, 347, 389, 419, 443, 461, 467, 491, 509, 557, 563, 587, 653, 659, 677, 683, 701, 773, 797, 821, 827, 941, 947, 971, 1013, 1019, 1061, 1091, 1109, 1163, 1181, 1187
Offset: 1

Author

Reinhard Zumkeller, Jun 10 2003

Keywords

Comments

Subsequence of A084864; A084863(a(n))>0.
Conjecture: A084863(a(n))=1?
Is it true that a(n) = A019338(n+1)?
Comment: The truth of the conjecture A084863(a(n))=1 follows from the genus theory of quadratic forms (see Cox, page 61). By comparing enough terms, we see that the conjecture a(n) = A019338(n+1) is false. - T. D. Noe, May 02 2008
Appears to be the primes p such that (p mod 6)*(Fibonacci(p) mod 6)=25. - Gary Detlefs, May 26 2014

Examples

			A000040(17) = 59 = 32 + 27 = 2*4^2 + 3*3^2, therefore 59 is a term.
		

References

  • David A. Cox, Primes of the Form x^2 + n y^2, Wiley, 1989.

Crossrefs

Programs

  • Mathematica
    QuadPrimes2[2, 0, 3, 10000] (* see A106856 *)
  • PARI
    list(lim)=my(v=List(),w,t); for(x=0, sqrtint(lim\2), w=2*x^2; for(y=0, sqrtint((lim-w)\3), if(isprime(t=w+3*y^2), listput(v,t)))); Set(v) \\ Charles R Greathouse IV, Feb 09 2017

Formula

The primes are congruent to {2, 3, 5, 11} (mod 24). - T. D. Noe, May 02 2008

A122487 2 together with odd primes p that divide Fibonacci[(p+1)/2].

Original entry on oeis.org

2, 13, 17, 37, 53, 73, 97, 113, 137, 157, 173, 193, 197, 233, 257, 277, 293, 313, 317, 337, 353, 373, 397, 433, 457, 557, 577, 593, 613, 617, 653, 673, 677, 733, 757, 773, 797, 853, 857, 877, 937, 953, 977, 997, 1013, 1033, 1093, 1097, 1117, 1153, 1193, 1213
Offset: 1

Author

Alexander Adamchuk, Sep 16 2006

Keywords

Comments

Primes of the form 2x^2+2xy+13y^2. Discriminant = -100. - T. D. Noe, May 02 2008
Primes of the form a^2 + b^2 such that a^2 == b^2 (mod 5). - Thomas Ordowski, May 18 2015

Programs

  • Mathematica
    Select[Prime[Range[1000]],IntegerQ[Fibonacci[(#1+1)/2]/#1]&]
  • PARI
    is(n)=my(k=n%20); (k==13||k==17||k==2) && isprime(n) \\ Charles R Greathouse IV, May 18 2015

Formula

Except for 2, the primes are congruent to {13, 17} (mod 20). - T. D. Noe, May 02 2008
2 together with all primes p == {13, 17} (mod 20). - Thomas Ordowski, May 18 2015

Extensions

Definition changed by T. D. Noe, May 02 2008
Showing 1-10 of 252 results. Next