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

A139827 Primes of the form 2x^2 + 2xy + 17y^2.

Original entry on oeis.org

2, 17, 29, 41, 101, 149, 173, 197, 233, 281, 293, 461, 557, 569, 593, 677, 701, 761, 809, 821, 857, 941, 953, 1097, 1217, 1229, 1289, 1361, 1481, 1493, 1553, 1601, 1613, 1733, 1877, 1889, 1913, 1949, 1997, 2081, 2129, 2141, 2153, 2213, 2273, 2309, 2393, 2417
Offset: 1

Views

Author

T. D. Noe, May 02 2008, May 07 2008

Keywords

Comments

Discriminant = -132.
Consider the quadratic form f(x,y) = ax^2 + bxy + cy^2. When the discriminant d=b^2-4ac is -4 times an idoneal number (A000926), there is exactly one class for each genus. As a result, the primes generated by f(x,y) are the same as the primes congruent to S (mod -d), where S is a set of numbers less than -d. The table on page 60 of Cox shows that there are exactly 331 quadratic forms having this property. The 217 sequences starting with this one complete the collection in the OEIS.
When a=1 and b=0, f(x,y) is a quadratic form whose congruences are discussed in A139642. Let N be an idoneal number. Then there are 2^r reduced quadratic forms whose discriminant is -4N, where r=1,2,3, or 4. By collecting the residuals p (mod 4N) for primes p generated by the i-th reduced quadratic form, we can empirically find a set Si. To show that the 2^r sets Si are complete, we only need to show that the union of the Si is equal to the set of numbers k such that the Jacobi symbol (-k/4N)=1.

References

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

Crossrefs

Cf. also A139653, A139904-A139906 (d=-1012), A139654, A139907-A139913 (d=-1092), A139655, A139914-A139920 (d=-1120), A139656, A139921-A139927 (d=-1248), A139657, A139928-A139934 (d=-1320), A139658, A139935-A139941 (d=-1380), A139659, A139942-A139948 (d=-1428), A139660, A139949-A139955 (d=-1540), A139661, A139956-A139962 (d=-1632), A139662, A139963-A139969 (d=-1848), A139663, A139970-A139976 (d=-2080), A139664, A139977-A139983 (d=-3040), A139665, A139984-A139998 (d=-3360), A139666, A139999-A140013 (d=-5280), A139667, A140014-A140028 (d=-5460), A139668, A140029-A140043 (d=-7392).
For a more complete list of sequences giving numbers and/or primes represented by binary quadratic forms, see the "Binary Quadratic Forms and OEIS" link.

Programs

  • Magma
    [ p: p in PrimesUpTo(2500) | p mod 132 in {2, 17, 29, 41, 65, 101}]; // Vincenzo Librandi, Jul 29 2012
    
  • Mathematica
    QuadPrimes2[2, -2, 17, 2500] (* see A106856 *)
    t = Table[{2, 17, 29, 41, 65, 101} + 132*n, {n, 0, 50}]; Select[Flatten[t], PrimeQ] (* T. D. Noe, Jun 21 2012 *)
  • PARI
    v=[2, 17, 29, 41, 65, 101]; select(p->setsearch(v,p%132),primes(100)) \\ Charles R Greathouse IV, Jan 08 2013

Formula

The primes are congruent to {2, 17, 29, 41, 65, 101} (mod 132).

A139643 Primes of the form x^2+Ny^2, with N=102.

Original entry on oeis.org

103, 127, 151, 223, 271, 409, 433, 457, 463, 577, 631, 727, 769, 919, 937, 967, 1033, 1039, 1063, 1087, 1249, 1279, 1327, 1447, 1471, 1543, 1657, 1753, 1759, 1777, 1783, 1801, 1879, 1951, 1993, 2089, 2143, 2161, 2287, 2311, 2473, 2503, 2551
Offset: 1

Views

Author

T. D. Noe, Apr 29 2008

Keywords

Comments

Discriminant=-408. N is an idoneal number (A000926), which means that the quadratic form's genus consists of a single class, which means that the primes of this form are identical to the primes that are congruent to c (mod 4N), where c is a set of numbers less than 4N. The sequence A139642 lists the set c for each idoneal number. That sequence also cross references the sequences for the quadratic forms with N equal to the first 36 idoneal numbers. The remaining quadratic forms are this sequence and the 28 listed in order below. Note that the sequences for N=120 and 240 are the same.
The primes are congruent to {1, 25, 49, 55, 103, 121, 127, 145, 151, 169, 217, 223, 247, 271, 319, 361} (mod 408).

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

Programs

  • Magma
    [ p: p in PrimesUpTo(3000) | p mod 408 in {1, 25, 49, 55, 103, 121, 127, 145, 151, 169, 217, 223, 247, 271, 319, 361}]; // Vincenzo Librandi, Jul 28 2012
    
  • Magma
    k:=102; [p: p in PrimesUpTo(3000) | NormEquation(k, p) eq true]; // Bruno Berselli, Jun 01 2016
  • Maple
    C:= [1, 25, 49, 55, 103, 121, 127, 145, 151, 169, 217, 223, 247, 271, 319, 361]:
    select(isprime, [seq(seq(408*i+j,j=C),i=0..100)]); # Robert Israel, Jul 03 2016
  • Mathematica
    nn=102; pMax=10000; Union[Reap[Do[p=x^2+nn*y^2; If[p<=pMax && PrimeQ[p], Sow[p]], {x,Sqrt[pMax]}, {y, Sqrt[pMax/nn]}]][[2,1]]] (* T. D. Noe, Aug 02 2009 *)
    QuadPrimes2[1, 0, 102, 10000] (* see A106856 *)

A139489 Primes of the form x^2+101y^2.

Original entry on oeis.org

101, 137, 677, 1009, 1493, 1693, 1697, 1933, 3137, 3613, 3637, 3701, 3821, 4217, 4261, 4273, 4289, 4373, 4457, 4597, 4861, 5273, 5441, 5849, 6029, 6037, 6473, 6661, 6689, 7193, 7253, 7309, 8377, 8581, 8609, 8677, 9337, 9781, 10133, 10181, 10433
Offset: 1

Views

Author

Artur Jasinski, Apr 24 2008

Keywords

Crossrefs

See "Binary Quadratic Forms and OEIS" link for list of sequences of primes of the form x^2+ny^2.

Programs

  • Mathematica
    a = {}; w = 101; Do[Do[If[PrimeQ[n^2 + w*m^2], AppendTo[a, n^2 + w*m^2]], {n, 1, 700}], {m, 1, 200}]; Union[a]
    QuadPrimes2[1,0,101,11000] (* see A106856 *)

Extensions

101 term prepended by T. D. Noe, Nov 05 2009

A244019 Primes of the form 9x^2 + 6xy + 1849y^2.

Original entry on oeis.org

1873, 2017, 2137, 2377, 2473, 2689, 3217, 3529, 3697, 4057, 4657, 5569, 6073, 6337, 7177, 7393, 7417, 7561, 7681, 7753, 8017, 8089, 8233, 8353, 8737, 8761, 9241, 9601, 9769, 11113, 11257, 11617, 12049, 12433, 12457, 12721, 13297, 13633, 13729, 14281, 15073, 15313, 16417, 17977, 19009, 19273, 20161, 21169, 23017, 24049, 25873, 26161, 26497, 26713, 29569, 30097
Offset: 1

Views

Author

N. J. A. Sloane, Jun 19 2014

Keywords

Comments

Discriminant=-66528.
More than the usual number of terms are shown in order to display the difference from A139668 (Primes of the form x^2+1848y^2). The two sequences agree for the first 43 primes but then disagree [Jagy and Kaplansky].
This is a proper subsequence of A139668, since the terms of A244019 have the form z^2 + 1848*y^2: in fact, 9*x^2 + 6*x*y + 1849*y^2 = (3*x+y)^2 + 1848*y^2. [Bruno Berselli, Jun 20 2014]

Crossrefs

Different from A139668 (Primes of the form x^2+1848y^2).

Programs

  • Maple
    fd:=proc(a,b,c,M) local dd,xlim,ylim,x,y,t1,t2,t3,t4,i;
    dd:=4*a*c-b^2;
    if dd<=0 then error "Form should be positive definite."; break; fi;
    t1:={};
    xlim:=ceil( sqrt(M/a)*(1+abs(b)/sqrt(dd)));
    ylim:=ceil( 2*sqrt(a*M/dd));
    for x from 0 to xlim do
    for y from -ylim to ylim do
    t2 := a*x^2+b*x*y+c*y^2;
    if t2 <= M then t1:={op(t1),t2}; fi; od: od:
    t3:=sort(convert(t1,list));
    t4:=[];
    for i from 1 to nops(t3) do
    if isprime(t3[i]) then t4:=[op(t4),t3[i]]; fi; od:
    [[seq(t3[i],i=1..nops(t3))], [seq(t4[i],i=1..nops(t4))]];
    end;
    fd(9,6,1849,50000);
  • Mathematica
    Reap[For[p = 2, p < 40000, p = NextPrime[p], s = Solve[x > 0 && 9 x^2 + 6 x y + 1849 y^2 == p, {x, y}, Integers]; If[s != {}, Print[p, " ", {x, y} /. s]; Sow[p]]]][[2, 1]] (* Jean-François Alcover, Oct 29 2020 *)

A173274 Primes of the form x^2 + 18480*y^2.

Original entry on oeis.org

18481, 19009, 19441, 20161, 21961, 31249, 41281, 47041, 48409, 51241, 68209, 70009, 70921, 74209, 74449, 74761, 75289, 76129, 76561, 77641, 80809, 84121, 85369, 86689, 87649, 90841, 91081, 91921, 93241, 97441, 102001, 102481, 106681
Offset: 1

Views

Author

Michel Lagneau, Feb 14 2010, Jun 08 2010

Keywords

Comments

The primes p of the form x^2 + 18480*y^2 are also of the multi-forms x^2 + y^2, x^2 + 2*y^2, x^2 + 3*y^2, ..., x^2 + 11*y^2, x^2 + 12*y^2, but the reverse is false. For example, p = 7561 has twelve forms, but is not of the form x^2 + 18480*y^2.

Examples

			18481 = 1^2 + 18480*1^2 and also 18481 = 16^2 + 135^2 = 7^2 + 2*96^2 = 127^2 + 3*28^2 = 135^2 + 4*8^2 = 74^2 + 5*51^2 = 59^2 + 6*50^2 = 97^2 + 7*36^2 = 7^2 + 8*48^2 = 16^2 + 9*45^2 = 29^2 + 10*42^2 = 65^2 + 11*36^2 = 127^2 + 12*14^2.
		

References

  • David A. Cox, "Primes of the Form x^2 + n*y^2", Wiley, 1989, Section 3.
  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 1848, p. 146, Ellipses, Paris 2008.

Crossrefs

Cf. A139668: primes of the form x^2 + 1848*y^2;
Cf. A139665: primes of the form x^2 + 840*y^2.

Programs

  • Maple
    fd:=proc(a,b,c,M) local dd,xlim,ylim,x,y,t1,t2,t3,t4,i;
    dd:=4*a*c-b^2;
    if dd<=0 then error "Form should be positive definite."; break; fi;
    t1:={};
    xlim:=ceil( sqrt(M/a)*(1+abs(b)/sqrt(dd)));
    ylim:=ceil( 2*sqrt(a*M/dd));
    for x from 0 to xlim do
    for y from -ylim to ylim do
    t2 := a*x^2+b*x*y+c*y^2;
    if t2 <= M then t1:={op(t1),t2}; fi; od: od:
    t3:=sort(convert(t1,list));
    t4:=[];
    for i from 1 to nops(t3) do
       if isprime(t3[i]) then t4:=[op(t4),t3[i]]; fi; od:
    [[seq(t3[i],i=1..nops(t3))], [seq(t4[i],i=1..nops(t4))]];
    end;
    fd(1,0,18480,100000);
  • Mathematica
    QuadPrimes2[1, 0, 18480, 100000] (* see A106856 *)
    (* Second program: *)
    max = 107000; m = 18480; Table[yy = {y, 1, Floor[Sqrt[max-x^2]/(Sqrt[m])]}; Table[x^2 + m y^2, yy // Evaluate], {x, 0, Floor[Sqrt[max]]}] // Flatten // Union // Select[#, PrimeQ]&
  • PARI
    fc(a,b,c,M) = {
      my(t1=List(),t2);
      forprime(p=2,prime(M),
        t2 = qfbsolve(Qfb(a,b,c),p);
        if(t2 != 0, listput(t1,p))
      );
      Vec(t1)
    };
    fc(1,0,18480,100000)

Extensions

Corrected sequence and replaced defective program. - Ray Chandler, Aug 14 2014
Showing 1-5 of 5 results.