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.

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

A033212 Primes congruent to 1 or 19 (mod 30).

Original entry on oeis.org

19, 31, 61, 79, 109, 139, 151, 181, 199, 211, 229, 241, 271, 331, 349, 379, 409, 421, 439, 499, 541, 571, 601, 619, 631, 661, 691, 709, 739, 751, 769, 811, 829, 859, 919, 991, 1009, 1021, 1039, 1051, 1069, 1129, 1171, 1201, 1231, 1249, 1279, 1291, 1321, 1381
Offset: 1

Keywords

Comments

Theorem: Same as primes of the form x^2+15*y^2 (discriminant -60). Proof: Cox, Cor. 2.27, p. 36.
Equivalently, primes congruent to 1 or 4 (mod 15). Also x^2+xy+4y^2 is the principal form of (fundamental) discriminant -15. The only other class for -15 contains the form 2x^2+xy+2y^2 (A106859), in the other genus. - Rick L. Shepherd, Jul 25 2014
Three further theorems (these were originally stated as conjectures, but are now known to be theorems, thanks to the work of J. B. Tunnell - see link):
1. The same as primes of the form x^2-xy+4y^2 (discriminant -15) and x^2-xy+19y^2 (discriminant -75), both with x and y nonnegative. - T. D. Noe, Apr 29 2008
2. The same as primes of the form x^2+xy+19y^2 (discriminant -75), with x and y nonnegative. - T. D. Noe, Apr 29 2008
3. The same as primes of the form x^2+5xy-5y^2 (discriminant 45). - N. J. A. Sloane, Jun 01 2014
Also primes of the form x^2+7*x*y+y^2 (discriminant 45).
Lemma (Will Jagy, Jun 12 2014): If c is any (positive or negative) even number, then x^2 + x y + c y^2 and x^2 + (4 c - 1) y^2 represent the same odd numbers.
Proof: x (x + y) + c y^2 = odd, therefore x is odd, x + y odd, so y is even. Let y = 2 t. Then x( x + 2 t) + 4 c t^2 = x^2 + 2 x t + 4 c t^2 = (x+t)^2 + (4c-1) t^2 = odd. QED With c = 4, neither one represents 2, so x^2+15y^2 and x^2+xy+4y^2 represent the same primes.
Also, primes which are squares (mod 3*5). Subsequence of A191018. - David Broadhurst and M. F. Hasler, Jan 15 2016

References

  • Z. I. Borevich and I. R. Shafarevich, Number Theory. Academic Press, NY, 1966.
  • David A. Cox, Primes of the Form x^2 + n y^2, Wiley, 1989.

Crossrefs

Primes in A243173 and in A243174.
Cf. A141785 (d=45), A033212 (Primes of form x^2+15*y^2), A038872(d=5), A038873 (d=8), A068228, A141123 (d=12), A038883 (d=13), A038889 (d=17), A141111, A141112 (d=65).
For a list of sequences giving numbers and/or primes represented by binary quadratic forms, see the "Binary Quadratic Forms and OEIS" link.

Programs

  • Mathematica
    QuadPrimes2[1, 0, 15, 10000] (* see A106856 *)
    Select[Prime@Range[250], MemberQ[{1, 19}, Mod[#, 30]] &] (* Vincenzo Librandi, Apr 05 2015 *)
  • PARI
    select(n->n%30==1||n%30==19, primes(100)) \\ Charles R Greathouse IV, Nov 09 2012
    
  • PARI
    is(p)=issquare(Mod(p,15))&&isprime(p) \\ M. F. Hasler, Jan 15 2016

Formula

a(n) ~ 4n log n. - Charles R Greathouse IV, Nov 09 2012

Extensions

Edited by N. J. A. Sloane, Jun 01 2014 and Oct 18 2014: added Tunnell document, revised entry, merged with A141184. The latter entry was submitted by Laura Caballero Fernandez, Lourdes Calvo Moguer, Maria Josefa Cano Marquez, Oscar Jesus Falcon Ganfornina and Sergio Garrido Morales (oscfalgan(AT)yahoo.es), Jun 12 2008.
Typo in crossrefs fixed by Colin Barker, Apr 05 2015

A341786 Norms of prime ideals in Z[(1+sqrt(-15))/2], the ring of integers of Q(sqrt(-15)).

Original entry on oeis.org

2, 3, 5, 17, 19, 23, 31, 47, 49, 53, 61, 79, 83, 107, 109, 113, 121, 137, 139, 151, 167, 169, 173, 181, 197, 199, 211, 227, 229, 233, 241, 257, 263, 271, 293, 317, 331, 347, 349, 353, 379, 383, 409, 421, 439, 443, 467, 499, 503, 541, 557, 563, 571, 587
Offset: 1

Author

Jianing Song, Feb 19 2021

Keywords

Comments

The norm of a nonzero ideal I in a ring R is defined as the size of the quotient ring R/I.
Note that Z[(1+sqrt(-15))/2] has class number 2.
Consists of the primes congruent to 1, 2, 3, 4, 5, 8 modulo 15 and the squares of primes congruent to 7, 11, 13, 14 modulo 15.
For primes p == 1, 4 (mod 15), there are two distinct ideals with norm p in Z[(1+sqrt(-15))/2], namely (x + y*(1+sqrt(-15))/2) and (x + y*(1-sqrt(-15))/2), where (x,y) is a solution to x^2 + x*y + 4*y^2 = p; for p == 2, 8 (mod 15), there are also two distinct ideals with norm p, namely (p, x + y*(1+sqrt(-15))/2) and (p, x + y*(1-sqrt(-15))/2), where (x,y) is a solution to x^2 + x*y + 4*y^2 = p^2 with y != 0; (3, sqrt(-15)) and (5, sqrt(-15)) are respectively the unique ideal with norm 3 and 5; for p == 7, 11, 13, 14 (mod 15), (p) is the only ideal with norm p^2.

Examples

			Let |I| be the norm of an ideal I, then:
|(2, (1+sqrt(-15))/2)| = |(2, (1-sqrt(-15))/2)| = 2;
|(3, sqrt(-15))| = 3;
|(5, sqrt(-15))| = 5;
|(17, 7+4*sqrt(-15))| = |(17, 7-4*sqrt(-15))| = 17;
|(2 + sqrt(-15))| = |(2 - sqrt(-15))| = 19;
|(23, 17+4*sqrt(-15))| = |(23, 17-4*sqrt(-15))| = 23;
|(4 + sqrt(-15))| = |(4 - sqrt(-15))| = 31.
		

Crossrefs

The number of distinct ideals with norm n is given by A035175.
Norms of prime ideals in O_K, where K is the quadratic field with discriminant D and O_K be the ring of integers of K: A055673 (D=8), A341783 (D=5), A055664 (D=-3), A055025 (D=-4), A090348 (D=-7), A341784 (D=-8), A341785 (D=-11), this sequence (D=-15*), A341787 (D=-19), A091727 (D=-20*), A341788 (D=-43), A341789 (D=-67), A341790 (D=-163). Here a "*" indicates the cases where O_K is not a unique factorization domain.

Programs

  • PARI
    isA341786(n) = my(disc=-15); (isprime(n) && kronecker(disc,n)>=0) || (issquare(n, &n) && isprime(n) && kronecker(disc,n)==-1)

A028955 Numbers represented by quadratic form with Gram matrix [ 4, 1; 1, 4 ] (divided by 2).

Original entry on oeis.org

0, 2, 3, 5, 8, 12, 17, 18, 20, 23, 27, 30, 32, 38, 45, 47, 48, 50, 53, 57, 62, 68, 72, 75, 80, 83, 92, 93, 95, 98, 102, 107, 108, 113, 120, 122, 125, 128, 137, 138, 147, 152, 153, 155, 158, 162, 167, 170, 173, 180, 183, 188, 192, 197, 200, 207, 212, 218, 227, 228
Offset: 1

Keywords

Comments

Numbers of the form 2*x^2 + x*y + 2*y^2, of discriminant -15. - N. J. A. Sloane, Jun 01 2014
8*a(n) is of the form z^2 + 15*y^2, where z = 4*x + y. [Bruno Berselli, Jul 12 2014]

Examples

			32 is in the sequence because it can be written in the form 2*2^2+2*3+2*3^2, and hence 8*32 = 11^2+15*3^2.
		

Crossrefs

Cf. A028927. For primes see A106859.

Formula

a(x, y) = (4x^2 + 2xy + 4y^2)/2; x, y any integer.

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Mar 29 2000

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

Original entry on oeis.org

2, 5, 23, 83, 107, 137, 173, 257, 293, 347, 353, 467, 503, 617, 647, 653, 743, 797, 857, 953, 983, 1223, 1277, 1283, 1307, 1427, 1487, 1493, 1523, 1553, 1637, 1787, 1877, 1913, 1997, 2003, 2027, 2213, 2237, 2243, 2393, 2423, 2447, 2657, 2663
Offset: 1

Author

T. D. Noe, May 09 2005

Keywords

Comments

Discriminant=-15.

Crossrefs

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]  && !MemberQ[ lst, p], AppendTo[ lst, p]], {y, 0, yMax}], {x, 0, xMax}]; Sort[ lst]];
    t2 = QuadPrimes2[2, 1, 2, 350000];
    Length[t2]
    t2[[Length[t2]]]
    For[n=1, n <= 2000, n++, Print[n, " ", t2[[n]]]] (* From N. J. A. Sloane, Jun 17 2014 *)

Extensions

Replace Mma program by a correct program, recomputed and extended b-file. - N. J. A. Sloane, Jun 17 2014

A020678 Numbers of form 3 x^2 + 5 y^2.

Original entry on oeis.org

0, 3, 5, 8, 12, 17, 20, 23, 27, 32, 45, 47, 48, 53, 57, 68, 72, 75, 80, 83, 92, 93, 95, 107, 108, 113, 120, 125, 128, 137, 147, 152, 153, 155, 167, 173, 180, 183, 188, 192, 197, 200, 207, 212, 227, 228, 233, 237, 243, 245, 248, 255, 257, 263, 272, 288, 293, 300, 305, 317
Offset: 1

Keywords

Comments

Discriminant -60.

Crossrefs

The primes in this sequence are given by A106859 (excluding 2). - N. J. A. Sloane, Jun 01 2014

Programs

  • Mathematica
    With[{upto=320},Select[Union[3#[[1]]^2+5#[[2]]^2&/@ Tuples[ Range[ 0, Ceiling[ Sqrt[upto]]],2]],#<+upto&]] (* Harvey P. Dale, May 22 2015 *)

A343241 Primes congruent to 2 or 8 modulo 15.

Original entry on oeis.org

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

Author

Wolfdieter Lang, May 20 2021

Keywords

Comments

This sequence is the complement of A033212 (primes congruent to 1 or 4 mod(15)) relative to the primes p with Jacobi(p|15) = +1 (A191018).
There is neither a solution x of the congruence x^2 == a(n) (mod 3) nor of x^2 == a(n) (mod 5) (the Legendre symbols are -1 in both cases, and Jacobi(a(n)|15) = +1).

Crossrefs

Cf. A033212, A106859 (with 3 and 5), A191018.

Programs

  • Mathematica
    Select[Range[1000], PrimeQ[#] && MemberQ[{2, 8}, Mod[#, 15]] &] (* Amiram Eldar, May 20 2021 *)
Showing 1-7 of 7 results.