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

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

Views

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.

A139492 Primes of the form x^2 + 5x*y + y^2 for x and y nonnegative.

Original entry on oeis.org

7, 37, 43, 67, 79, 109, 127, 151, 163, 193, 211, 277, 331, 337, 373, 379, 421, 457, 463, 487, 499, 541, 547, 571, 613, 631, 673, 709, 739, 751, 757, 823, 877, 883, 907, 919, 967, 991, 1009, 1033, 1051, 1087, 1093, 1117, 1129, 1171, 1201, 1213, 1297, 1303
Offset: 1

Views

Author

Artur Jasinski, Apr 24 2008

Keywords

Comments

Reduced form is [1, 3, -3]. Discriminant = 21. Class number = 2.
Values of the quadratic form are {0, 1, 3, 4} mod 6, so this is a subsequence of A002476. - R. J. Mathar, Jul 30 2008
It can be checked that the primes p of the form x^2 + n*x*y + y^2, n >= 3, where x and y are nonnegative, depend on n mod 6 as follows: n mod 6 = 0 => p mod 12 = {1,5}; n mod 6 = 1 => p mod 12 = {1,7}; n mod 6 = 2 => p mod 12 = {1}; n mod 6 = 3 => p mod 12 = {1,5,7,11}; n mod 6 = 4 => p mod 12 = {1}; n mod 6 = 5 => p mod 12 = {1,7}. - Walter Kehowski, Jun 01 2008

Examples

			a(1) = 7 because we can write 7 = 1^2 + 5*1*1 + 1^2.
		

References

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

Crossrefs

Primes in A243172.
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
    a = {}; w = 5; k = 1; Do[Do[If[PrimeQ[n^2 + w*n*m + k*m^2], AppendTo[a, n^2 + w*n*m + k*m^2]], {n, m, 400}], {m, 1, 400}]; Union[a]
  • Sage
    # uses[binaryQF]
    # The function binaryQF is defined in the link 'Binary Quadratic Forms'.
    Q = binaryQF([1, 5, 1])
    print(Q.represented_positives(1303, 'prime')) # Peter Luschny, May 12 2021

A141160 Primes of the form -x^2 + 3*x*y + 3*y^2 (as well as of the form 5*x^2 + 9*x*y + 3*y^2).

Original entry on oeis.org

3, 5, 17, 41, 47, 59, 83, 89, 101, 131, 167, 173, 227, 251, 257, 269, 293, 311, 353, 383, 419, 461, 467, 479, 503, 509, 521, 563, 587, 593, 647, 677, 719, 761, 773, 797, 839, 857, 881, 887, 929, 941, 971, 983, 1013, 1049, 1091, 1097, 1109, 1151, 1181, 1193
Offset: 1

Views

Author

Laura Caballero Fernandez, Lourdes Calvo Moguer, Maria Josefa Cano Marquez, Oscar Jesus Falcon Ganfornina and Sergio Garrido Morales (marcanmar(AT)alum.us.es), Jun 12 2008

Keywords

Comments

Discriminant = 21. Class number = 2. Binary quadratic forms a*x^2 + b*x*y + c*y^2 have discriminant d = b^2 - 4ac and gcd(a,b,c) = 1 (primitive).
Except a(1) = 3, primes congruent to {5, 17, 20} mod 21. - Vincenzo Librandi, Jul 11 2018
The comment above is true since the binary quadratic forms with discriminant 21 are in two classes as well as two genera, so there is one class in each genus. A141159 is in the other genus, with primes = 7 or congruent to {1, 4, 16} mod 21. - Jianing Song, Jul 12 2018
4*a(n) can be written in the form 21*w^2 - z^2. - Bruno Berselli, Jul 13 2018
Both forms [-1, 3, 3] (reduced) and [5, 9, 3] (not reduced) are properly (via a determinant +1 matrix) equivalent to the reduced form [3, 3, -1], a member of the 2-cycle [[3, 3, -1], [-1, 3, 3]]. The other reduced form is the principal form [1, 3, -3], with 2-cycle [[1, 3, -3], [-3, 3, 1]] (see, e.g., A141159, A139492). - Wolfdieter Lang, Jun 24 2019

Examples

			a(3)=17 because we can write 17 = -1^2 + 3*1*2 + 3*2^2 (or 17 = 5*1^2 + 9*1*1 + 3*1^2).
		

References

  • Z. I. Borevich and I. R. Shafarevich, Number Theory. Academic Press, NY, 1966.
  • D. B. Zagier, Zetafunktionen und quadratische Körper, Springer, 1981.

Crossrefs

Cf. A141159, A139492 (d=21) A038872 (d=5). A038873 (d=8). A068228, A141123 (d=12). A038883 (d=13). A038889 (d=17): A141111, A141112 (d=65).
Primes in A237351.
For a list of sequences giving numbers and/or primes represented by binary quadratic forms, see the "Binary Quadratic Forms and OEIS" link.

Programs

  • Magma
    [3] cat [p: p in PrimesUpTo(2000) | p mod 21 in [5, 17, 20]]; // Vincenzo Librandi, Jul 11 2018
    
  • Mathematica
    Reap[For[p = 2, p < 2000, p = NextPrime[p], If[FindInstance[p == -x^2 + 3*x*y + 3*y^2, {x, y}, Integers, 1] =!= {}, Print[p]; Sow[p]]]][[2, 1]] (* Jean-François Alcover, Oct 25 2016 *)
    Join[{3}, Select[Prime[Range[250]], MemberQ[{5, 17, 20}, Mod[#, 21]] &]] (* Vincenzo Librandi, Jul 11 2018 *)
  • Sage
    # uses[binaryQF]
    # The function binaryQF is defined in the link 'Binary Quadratic Forms'.
    Q = binaryQF([-1, 3, 3])
    Q.represented_positives(1200, 'prime') # Peter Luschny, Jun 24 2019

Extensions

More terms from Colin Barker, Apr 05 2015

A038893 Odd primes p such that 21 is a square mod p.

Original entry on oeis.org

3, 5, 7, 17, 37, 41, 43, 47, 59, 67, 79, 83, 89, 101, 109, 127, 131, 151, 163, 167, 173, 193, 211, 227, 251, 257, 269, 277, 293, 311, 331, 337, 353, 373, 379, 383, 419, 421, 457, 461, 463, 467, 479, 487, 499, 503
Offset: 1

Views

Author

Keywords

Comments

These primes correspond to the representation of the two classes of discriminant 21 of binary quadratic forms with principal reduced forms [1, 3, -3] and [3, 3, -1]. The first class represents the primes given in A141159 (or A139492). The second class gives the prime 3 (which divides 21), and primes congruent to 2 (mod 3) and also to 3, 5, 6 (mod 7). The solution of x^2 - 21 == 0 (mod p) leads to the representative primitive parallel forms for discriminant 21 and representation of primes p. - Wolfdieter Lang, Jun 19 2019
Prime factors of A082111 and excluding the 3, prime factors of A004538. - Klaus Purath, Jan 04 2023

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[100]], JacobiSymbol[21, #] != -1 &] (* Vincenzo Librandi, Sep 07 2012 *)
  • PARI
    isok(p) = (p>2) && isprime(p) && issquare(Mod(21, p)); \\ Michel Marcus, Jun 19 2019

Extensions

Name clarified by Michel Marcus, Jun 22 2019

A243172 Nonnegative integers of the form x^2 + 3*x*y - 3*y^2 (discriminant 21).

Original entry on oeis.org

0, 1, 4, 7, 9, 15, 16, 25, 28, 36, 37, 43, 49, 51, 60, 63, 64, 67, 79, 81, 85, 100, 105, 109, 112, 121, 123, 127, 135, 141, 144, 148, 151, 163, 169, 172, 175, 177, 193, 196, 204, 205, 211, 225, 235, 240, 249, 252, 256, 259, 267, 268, 277, 289, 295, 301, 303, 316, 324, 331, 333, 337, 340, 343, 357, 361, 373, 375, 379, 387, 393, 400, 415, 420, 421, 436, 441, 445, 448, 457, 459, 463, 469, 484, 487, 492, 499
Offset: 1

Views

Author

N. J. A. Sloane, Jun 01 2014

Keywords

Comments

Also numbers representable as x^2 + 5*x*y + y^2 with 0 <= x <= y. - Gheorghe Coserea, Jul 29 2018
Also numbers of the form x^2 - x*y - 5*y^2 with 0 <= x <= y (or x^2 + x*y - 5*y^2 with x, y nonnegative). - Jianing Song, Jul 31 2018
Also nonnegative numbers of the form 7*x^2 - 3*y^2. - Jon E. Schoenfield, Jun 03 2022

Crossrefs

Cf. A031363.
Primes: A141159.

Programs

  • Mathematica
    A={}; For[ n=0, n <= 300, n++,
        If[ Length[ Reduce[x^2 + 3 x y - 3 y^2 - n == 0, {x,y}, Integers]]>0, AppendTo[A,n]]]; A
  • PARI
    \\ From Bill Allombert, Jun 04 2014. Since 21 is a fundamental discriminant, and the polynomial is unitary, the following code works:
    B=bnfinit(x^2+3*x-3); select(n->#bnfisintnorm(B,n),[1..500])

A141750 Primes of the form 4*x^2 + 3*x*y - 4*y^2 (as well as of the form 2*x^2 + 9*x*y + y^2).

Original entry on oeis.org

2, 3, 19, 23, 37, 41, 61, 67, 71, 73, 79, 89, 97, 109, 127, 137, 149, 173, 181, 211, 223, 227, 251, 257, 269, 283, 293, 311, 317, 347, 349, 353, 359, 367, 373, 383, 389, 397, 401, 419, 439, 457, 461, 463, 479, 487, 499, 503, 509, 523, 547, 557, 587, 593, 607
Offset: 1

Views

Author

Laura Caballero Fernandez, Lourdes Calvo Moguer, Maria Josefa Cano Marquez, Oscar Jesus Falcon Ganfornina and Sergio Garrido Morales (sergarmor(AT)yahoo.es), Jul 03 2008

Keywords

Comments

Discriminant = 73. Class = 1. Binary quadratic forms a*x^2 + b*x*y + c*y^2 have discriminant d = b^2-4ac.
Is this the same as A038957? - R. J. Mathar, Jul 04 2008. Answer: almost certainly - see the Tunnell notes in A033212. - N. J. A. Sloane, Oct 18 2014

Examples

			a(2) = 3 because we can write 3 = 4*1^2 + 3*1*1 - 4*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). A107152, A141302, A141303, A141304 (d=60). A141215 (d=61). A141111, A141112 (d=65). A141161, A141163 (d=148). A141165, A141166 (d=229). A141167, A141168 (d=257).

A141772 Primes of the form 3*x^2 + 5*x*y - 5*y^2 (as well as of the form 7*x^2 + 13*x*y + 3*y^2).

Original entry on oeis.org

3, 5, 7, 17, 23, 37, 73, 97, 107, 113, 163, 167, 173, 193, 197, 227, 233, 277, 283, 313, 317, 337, 347, 367, 397, 487, 503, 547, 607, 617, 643, 653, 673, 677, 683, 743, 787, 823, 827, 853, 857, 877, 887, 907, 947, 983, 997, 1013, 1093, 1117, 1153, 1163, 1187
Offset: 1

Views

Author

Laura Caballero Fernandez, Lourdes Calvo Moguer, Maria Josefa Cano Marquez, Oscar Jesus Falcon Ganfornina and Sergio Garrido Morales (sergarmor(AT)yahoo.es), Jul 04 2008

Keywords

Comments

Discriminant = 85. Class = 2. Binary quadratic forms a*x^2 + b*x*y + c*y^2 have discriminant d = b^2 - 4ac.

Examples

			a(1) = 3 because we can write 3 = 3*1^2 + 5*1*0 - 5*0^2 (or 3 = 7*0^2 + 13*0*1 + 3*1^2).
		

References

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

Crossrefs

Cf. A141773 (d=85). 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). A107152, A141302, A141303, A141304 (d=60). A141215 (d=61). A141111, A141112 (d=65). A141750 (d=73). A141161, A141163 (d=148). A141165, A141166 (d=229). A141167, A141168 (d=257).

Extensions

More terms from Colin Barker, Apr 04 2015
Typo in crossrefs fixed by Colin Barker, Apr 05 2015

A141778 Primes of the form 4*x^2 + 3*x*y - 5*y^2 (as well as of the form 8*x^2 + 11*x*y + y^2).

Original entry on oeis.org

2, 5, 11, 17, 47, 53, 67, 71, 73, 79, 89, 97, 107, 109, 131, 139, 157, 167, 173, 179, 199, 223, 227, 233, 251, 257, 263, 269, 271, 277, 283, 307, 311, 317, 331, 347, 367, 373, 401, 409, 443, 449, 461, 463, 467, 479, 487, 509, 523, 587, 601, 607, 613, 619, 631
Offset: 1

Views

Author

Laura Caballero Fernandez, Lourdes Calvo Moguer, Maria Josefa Cano Marquez, Oscar Jesus Falcon Ganfornina and Sergio Garrido Morales (sergarmor(AT)yahoo.es), Jul 04 2008

Keywords

Comments

Discriminant = 89. Class = 1. Binary quadratic forms a*x^2+b*x*y+c*y^2 have discriminant d=b^2-4ac and gcd(a,b,c)=1.
A subsequence of (and may possibly coincide with) A038977. - R. J. Mathar, Jul 22 2008

Examples

			a(1) = 2 because we can write 2 = 4*1^2 + 3*1*1 - 5*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). A107152, A141302, A141303, A141304 (d=60). A141215 (d=61). A141111, A141112 (d=65). A141750 (d=73). A141772, A141773 (d=85). A141776, A141777 (d=88). A141778 (d=89). A141161, A141163 (d=148). A141165, A141166 (d=229). A141167, A141168 (d=257).

Extensions

Typo in crossrefs fixed by Colin Barker, Apr 05 2015
Showing 1-8 of 8 results.