A106856 Primes of the form x^2 + xy + 2y^2, with x and y nonnegative.
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
A033205 Primes of form x^2 + 5*y^2.
5, 29, 41, 61, 89, 101, 109, 149, 181, 229, 241, 269, 281, 349, 389, 401, 409, 421, 449, 461, 509, 521, 541, 569, 601, 641, 661, 701, 709, 761, 769, 809, 821, 829, 881, 929, 941, 1009, 1021, 1049, 1061, 1069, 1109, 1129, 1181, 1201, 1229, 1249, 1289, 1301, 1321, 1361, 1381, 1409, 1429, 1481, 1489
Offset: 1
Comments
It is a classical result that p is of the form x^2 + 5y^2 if and only if p = 5 or p == 1 or 9 mod 20 (see Cox, page 33). - N. J. A. Sloane, Sep 20 2012
Or, 5 and all primes p that divide Fibonacci((p - 1)/2) = A121568(n). - Alexander Adamchuk, Aug 07 2006
References
- David A. Cox, "Primes of the Form x^2 + n y^2", Wiley, 1989; see p. 33.
Links
- Vincenzo Librandi and Ray Chandler, Table of n, a(n) for n = 1..10000 [First 2000 terms from Vincenzo Librandi]
- B. W. Brewer, On primes of the form u^2+5v^2, Am. Math. Monthly vol. 17 no 2 (1966) pp 502-509.
- N. J. A. Sloane et al., Binary Quadratic Forms and OEIS (Index to related sequences, programs, references)
Crossrefs
Programs
-
Magma
[p: p in PrimesUpTo(2000) | NormEquation(5,p) eq true]; // Bruno Berselli, Jul 03 2016
-
Mathematica
QuadPrimes2[1, 0, 5, 10000] (* see A106856 *)
-
PARI
is(n)=my(k=n%20); n==5 || ((k==9 || k==9) && isprime(n)) \\ Charles R Greathouse IV, Feb 09 2017
Formula
a(n) ~ 4n log n. - Charles R Greathouse IV, Nov 09 2012
A020669 Numbers of form x^2 + 5 y^2.
0, 1, 4, 5, 6, 9, 14, 16, 20, 21, 24, 25, 29, 30, 36, 41, 45, 46, 49, 54, 56, 61, 64, 69, 70, 80, 81, 84, 86, 89, 94, 96, 100, 101, 105, 109, 116, 120, 121, 125, 126, 129, 134, 141, 144, 145, 149, 150, 161, 164, 166, 169, 174, 180, 181, 184, 189, 196, 201, 205, 206, 214, 216
Offset: 1
Comments
In other words, numbers represented by quadratic form with Gram matrix [1,0; 0,5].
x^2 + 5 y^2 has discriminant -20.
A positive integer n is in this sequence if and only if the p-adic order ord_p(n) of n is even for any prime p with floor(p/10) odd, and the number of prime divisors p == 3 or 7 (mod 20) of n with ord_p(n) odd has the same parity with ord_2(n). - Zhi-Wei Sun, Mar 24 2018
References
- H. Cohn, A second course in number theory, John Wiley & Sons, Inc., New York-London, 1962. See pp. 3, 4 and later chapters.
- David A. Cox, Primes of the Form x^2 + n y^2, Wiley, 1989. See Eq. (2.22), p. 33.
Links
- N. J. A. Sloane, Table of n, a(n) for n = 1..13859
- N. J. A. Sloane et al., Binary Quadratic Forms and OEIS (Index to related sequences, programs, references)
Crossrefs
Programs
-
Magma
[n: n in [0..216] | NormEquation(5, n) eq true]; // Arkadiusz Wesolowski, May 11 2016
-
Maple
select(t -> [isolve(x^2+5*y^2=t)]<>[], [$0..1000]); # Robert Israel, May 11 2016
-
Mathematica
formQ[n_] := Reduce[x >= 0 && y >= 0 && n == x^2 + 5 y^2, {x, y}, Integers] =!= False; Select[ Range[0, 300], formQ] (* Jean-François Alcover, Sep 20 2011 *) mx = 300; limx = Sqrt[mx]; limy = Sqrt[mx/5]; Select[ Union[ Flatten[ Table[x^2 + 5*y^2, {x, 0, limx}, {y, 0, limy}] ] ], # <= mx & ] (* T. D. Noe, Sep 20 2011 *)
Formula
List contains 0 and all positive n such that 2*A035170(n) = A028586(2n) is nonzero. - Michael Somos, Oct 21 2006
Extensions
Entry revised by N. J. A. Sloane, Sep 20 2012
A091727 Norms of prime ideals of Z[sqrt(-5)].
2, 3, 5, 7, 23, 29, 41, 43, 47, 61, 67, 83, 89, 101, 103, 107, 109, 121, 127, 149, 163, 167, 169, 181, 223, 227, 229, 241, 263, 269, 281, 283, 289, 307, 347, 349, 361, 367, 383, 389, 401, 409, 421, 443, 449, 461, 463, 467, 487
Offset: 1
Comments
Consists of primes congruent to 1, 2, 3, 5, 7, 9 (mod 20) together with the squares of all other primes.
From Jianing Song, Feb 20 2021: (Start)
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[sqrt(-5)] has class number 2.
For primes p == 1, 9 (mod 20), there are two distinct ideals with norm p in Z[sqrt(-5)], namely (x + y*sqrt(-5)) and (x - y*sqrt(-5)), where (x,y) is a solution to x^2 + 5*y^2 = p.
For p == 3, 7 (mod 20), there are also two distinct ideals with norm p, namely (p, x+y*sqrt(-5)) and (p, x-y*sqrt(-5)), where (x,y) is a solution to x^2 + 5*y^2 = p^2 with y != 0; (2, 1+sqrt(-5)) and (sqrt(-5)) are respectively the unique ideal with norm 2 and 5.
For p == 11, 13, 17, 19 (mod 20), (p) is the only ideal with norm p^2. (End)
Examples
From _Jianing Song_, Feb 20 2021: (Start) Let |I| be the norm of an ideal I, then: |(2, 1+sqrt(-5))| = 2; |(3, 2+sqrt(-5))| = |(3, 2-sqrt(-5))| = 3; |(sqrt(-5))| = 5; |(7, 1+3*sqrt(-5))| = |(7, 1-3*sqrt(-5))| = 7; |(23, 22+3*sqrt(-5))| = |(23, 22-3*sqrt(-5))| = 23; |(3 + 2*sqrt(-5))| = |(3 - 2*sqrt(-5))| = 29; |(6 + sqrt(-5))| = |(6 - sqrt(-5))| = 41. (End)
References
- David A. Cox, Primes of the form x^2+ny^2, Wiley, 1989.
- A. Frohlich and M. J. Taylor, Algebraic number theory, Cambridge university press, 1991.
Links
- Jianing Song, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A091728.
The number of distinct ideals with norm n is given by A035170.
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), A341786 (D=-15*), A341787 (D=-19), this sequence (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
isA091727(n) = { my(ms = [1, 2, 3, 5, 7, 9], p, e=isprimepower(n,&p)); if(!e || e>2, 0, bitxor(e-1,!!vecsearch(ms,p%20))); }; \\ Antti Karttunen, Feb 24 2020
Extensions
Offset corrected by Jianing Song, Feb 20 2021
A122870 Primes congruent to 3 or 7 mod 20.
3, 7, 23, 43, 47, 67, 83, 103, 107, 127, 163, 167, 223, 227, 263, 283, 307, 347, 367, 383, 443, 463, 467, 487, 503, 523, 547, 563, 587, 607, 643, 647, 683, 727, 743, 787, 823, 827, 863, 883, 887, 907, 947, 967, 983, 1063, 1087, 1103, 1123, 1163, 1187, 1223
Offset: 1
Keywords
Comments
The old name was "Primes p that divide Lucas((p+1)/2) = A000032((p+1)/2)".
Note that F(p+1) = F((p+1)/2)*Lucas((p+1)/2), where F = A000045. Since gcd(F(n),Lucas(n)) = 1 or 2 (because Lucas(n)^2 - 5*F(n)^2 = 4*(-1)^n), this sequence (under the old definition above) lists primes p such that p divides F(p+1) but does not divides F((p+1)/2). By Propositions 1.1 and 1.2 (the k = 3 case) of my link below, this is primes p == 3, 7 (mod 20). - Jianing Song, Jun 20 2025
References
- David A. Cox, "Primes of the Form x^2 + n y^2", Wiley, 1989; see p. 33.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
- Jianing Song, Lucas sequences and entry point modulo p
- Eric Weisstein's World of Mathematics, Lucas Number.
- Eric Weisstein's World of Mathematics, Gaussian Prime.
Crossrefs
Programs
-
Magma
[p: p in PrimesUpTo(1500) | p mod 20 in [3, 7]]; // Vincenzo Librandi, Jan 06 2013
-
Mathematica
Select[Prime[Range[1000]],IntegerQ[(Fibonacci[(#1+1)/2-1]+Fibonacci[(#1+1)/2+1])/#1]&] Select[Prime[Range[300]], MemberQ[{3, 7}, Mod[#, 20]]&] (* Vincenzo Librandi, Jan 06 2013 *)
Extensions
I merged A216816 into this entry at the suggestion of Jianing Song, Jun 20 2025. - N. J. A. Sloane, Jun 22 2025
A344231 Positive integers k properly represented by the positive definite binary quadratic form X^2 + 5*Y^2 = k, in increasing order.
1, 5, 6, 9, 14, 21, 29, 30, 41, 45, 46, 49, 54, 61, 69, 70, 81, 86, 89, 94, 101, 105, 109, 126, 129, 134, 141, 145, 149, 161, 166, 174, 181, 189, 201, 205, 206, 214, 229, 230, 241, 245, 246, 249, 254, 261, 269, 270, 281, 294, 301, 305, 309, 321, 326, 329, 334, 345, 349, 366, 369, 381, 389, 401, 405
Offset: 1
Comments
This is a proper subsequence of A020669.
The primes in this sequence are given in A033205.
Discriminant Disc = -20 = -4*5. Class number h(-20) = A000003(5) = 2. The reduced primitive forms representing the two proper (determinant = +1) equivalence classes are the present principal form F1 = [1, 0, 5] and F2 = [2, 2, 3] treated in A344232.
A positive integer k is properly represented by some primitive form of Disc = -20 if and only if the congruence s^2 + 20 == 0 (mod 4*k) has a solution. See, e.g., Buell Proposition 41, p. 50, or Scholz-Schoeneberg Satz 74, p. 105. That is, x^2 + 5 == 0 (mod k), with s = 2*x. For the representative solutions x from {0, 1, ..., k-1}, with k from A343238, see A343239. These solutions x determine the so-called representative parallel primitive forms (rpapfs) [k, 2*x, (x^2 + 5)/k] representing k. They are properly equivalent (via so called R(t)-transformations) to one of the reduced forms F1 or F2. (See also W. Lang's links in A225953 and A324251, but there indefinite forms are considered.)
In order to find out which k from A343238 is represented either by form F1 or F2 the two generic multiplicative characters of Disc = -20, namely Legendre(k|p), with the odd prime p = 5 which divides Disc = -20, and Jacobi(-1|k) can be used. See Buell, pp. 51-52. They lead to the two classes of genera of Disc -20.
The present genus I, the principal one, has for odd primes p, not 5, the values Legendre(p|5) = Legendre(5|p) = +1 and Jacobi(-1|p) = Legendre(-1|p) = +1, leading for odd primes not equal to 5 to A033205. The prime 2 is not represented. The prime 5 is trivially represented. For the other genus II these two characters have values -1. There prime 2 is represented.
For composite k the prime number factorization is used, and for powers of primes the lifting theorem is employed (see, e.g., Apostol, p. 121, Theorem 5.30). The solution for prime 2 represented by form F2 = [2, 2, 3] (from the other genus II) is not liftable to powers of 2. The solution for prime 5 is also not liftable (proof by induction). The solutions of the other primes from A033205 and A106865 are uniquely liftable to powers of these primes. See A343238 for all properly represented k for Disc = -20.
For the present genus I the properly represented integers k are given by 2^a*5^b*Product_{j=1..PI} (pI_j)^(eI(j))*Product_{k=1..PII} (pII_k)^(eII(k)), with a and b from {0, 1} but if PI = PII = 0 (empty products are 1) then a = b = 0 giving a(1) = 1. The odd primes pI_j are from A033205 (== {1, 9} (mod 20)), the primes pII_k are from the odd primes of A106865 (== {3, 7}(mod 20)). The exponents of the second product are restricted: if a = 1 then PII >= 1 and Sum_{k=1..PII} eII(k) is odd. If a = 0 then PII >= 0, and if PII >= 1 then this sum is even.
Neighboring numbers k (twins) begin: [5, 6], [29, 30], [45, 46], [69, 70], [205, 206], [229, 230], [245, 246], [269, 270], [405, 406], ...
For the solutions (X, Y) of F2 = [1, 0, 5] properly representing k = a(n) see A344233.
References
- Tom M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, pp 121 - 122.
- D. A. Buell, Binary Quadratic Forms, Springer, 1989.
- A. Scholz and B. Schoeneberg, Einführung in die Zahlentheorie, Sammlung Göschen Band 5131, Walter de Gruyter, 1973.
A028586 Theta series of lattice with Gram matrix [2 1; 1 3].
1, 0, 2, 4, 0, 0, 0, 4, 2, 0, 2, 0, 4, 0, 0, 4, 0, 0, 6, 0, 0, 0, 0, 4, 0, 0, 0, 8, 4, 0, 0, 0, 2, 0, 0, 4, 0, 0, 0, 0, 2, 0, 8, 4, 0, 0, 0, 4, 4, 0, 2, 0, 0, 0, 0, 0, 0, 0, 4, 0, 4, 0, 0, 12, 0, 0, 0, 4, 0, 0, 0, 0, 6, 0, 0, 4, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 0, 8, 0, 0, 6, 0, 4, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 4
Offset: 0
Keywords
Comments
Ramanujan theta functions: f(q) := Prod_{k>=1} (1-(-q)^k) (see A121373), phi(q) := theta_3(q) := Sum_{k=-oo..oo} q^(k^2) (A000122), psi(q) := Sum_{k=0..oo} q^(k*(k+1)/2) (A010054), chi(q) := Prod_{k>=0} (1+q^(2k+1)) (A000700).
The number of integer solutions (x, y) to 2*x^2 + 2*x*y + 3*y^2 = n, discriminant -20. - Ray Chandler, Jul 12 2014
Examples
1 + 2*q^2 + 4*q^3 + 4*q^7 + 2*q^8 + 2*q^10 + 4*q^12 + 4*q^15 + 6*q^18 + 4*q^23 + 8*q^27 + 4*q^28 + 2*q^32 + 4*q^35 + 2*q^40 + 8*q^42 + 4*q^43 + 4*q^47 + ...
Links
- John Cannon, Table of n, a(n) for n = 0..10000
- A. Berkovich and H. Yesilyurt, Ramanujan's identities and representation of integers by certain binary and quaternary quadratic forms, arXiv:math/0611300 [math.NT], 2006-2007, page 8 equation (3.18).
- N. J. A. Sloane et al., Binary Quadratic Forms and OEIS (Index to related sequences, programs, references)
- Michael Somos, Introduction to Ramanujan theta functions
- Eric Weisstein's World of Mathematics, Ramanujan Theta Functions
Programs
-
Mathematica
terms = 104; phi[q_] := EllipticTheta[3, 0, q]; chi[q_] := ((1 - InverseEllipticNomeQ[q])*InverseEllipticNomeQ[q]/(16*q))^(-1/24); psi[q_] := (1/2)*q^(-1/8)*EllipticTheta[2, 0, q^(1/2)]; s = phi[q^2]*phi[q^10] + 4*q^3*psi[q^4]*psi[q^20] + O[q]^(terms+1); CoefficientList[s, q] (* Jean-François Alcover, Jul 04 2017, after Michael Somos *) r[n_]:=Reduce[{x, y}.{{2, 1}, {1, 3}}.{x, y}==n, {x, y}, Integers]; Table[rn=r[n]; Which[rn===False, 0, Head[rn]===Or, Length[rn], Head[rn]===And, 1], {n, 0, 105}] (* Vincenzo Librandi, Feb 23 2020 *)
-
PARI
{a(n) = if( n<1, n==0, qfrep([2, 1; 1, 3], n)[n] * 2)} /* Michael Somos, Aug 13 2006 */
Formula
G.f.: Sum_{n,m} x^(2*n^2 + 2*m*n + 3*m^2). - Michael Somos, Jan 31 2011
Expansion of (theta_3(z)*theta_3(5z)+theta_2(z)*theta_2(5z)).
Expansion of phi(q^2) * phi(q^10) + 4 * q^3 * psi(q^4) * psi(q^20) in powers of q where phi(q),psi(q) are Ramanujan theta functions. - Michael Somos, Aug 13 2006
If p is prime then a(p) is nonzero iff p is in A106865.
0=a(n)a(2n) and 2*A035170(n)=a(n)+a(2n) if n>0. - Michael Somos, Oct 21 2006
A106864 Primes of the form 2x^2+2xy+3y^2 with x and y nonnegative.
2, 3, 7, 43, 47, 83, 103, 107, 163, 167, 223, 263, 283, 347, 367, 383, 443, 467, 487, 503, 523, 547, 607, 643, 683, 743, 787, 823, 827, 863, 883, 887, 947, 967, 983, 1063, 1087, 1123, 1223, 1303, 1307, 1367, 1423, 1427, 1447, 1483, 1487, 1523, 1583
Offset: 1
Comments
See A106865 for all primes represented by this form.
Discriminant=-20.
Union of {2} and primes == 3 or 7 mod 20. - N. J. A. Sloane, Sep 04 2012
References
- David A. Cox, Primes of the Form x^2 + n y^2, Wiley, 1989. See Eq. (2.22), p. 33. - N. J. A. Sloane, Sep 04 2012
Links
- Vincenzo Librandi and Ray Chandler, Table of n, a(n) for n = 1..10000 [First 1000 terms from Vincenzo Librandi]
- N. J. A. Sloane et al., Binary Quadratic Forms and OEIS (Index to related sequences, programs, references)
Crossrefs
Cf. A106865.
Programs
-
Mathematica
QuadPrimes2[2, 2, 3, 10000] (* see A106856 *)
A344232 All positive integers k properly represented by the positive definite binary quadratic form 2*X^2 + 2*X*Y + 3*Y^2 = k, in increasing order.
2, 3, 7, 10, 15, 18, 23, 27, 35, 42, 43, 47, 58, 63, 67, 82, 83, 87, 90, 98, 103, 107, 115, 122, 123, 127, 135, 138, 147, 162, 163, 167, 178, 183, 202, 203, 207, 210, 215, 218, 223, 227, 235, 243, 258, 263, 267, 282, 283, 287, 290, 298, 303, 307, 315, 322, 327, 335, 343, 347, 362, 367, 378, 383, 387
Offset: 1
Comments
This is a proper subsequence of A029718.
The primes in this sequence are given in A106865.
See A344231 for more details.
The reduced form [2, 2, 3] represents the proper (determinant +1) equivalence class of one of the two genera (genus II) of discriminant -20. The multiplicative generic characters for discriminant Disc = -20 have values Jacobi(a(n)|5) = -1 and Jacobi(-1|a(n)) = -1, for odd a(n) not divisible by 5. See Buell, p. 52.
The product of any two odd a(n), not divisible by 5, is congruent to {1,5} (mod 8). See Buell, 4), p. 51.
For this genus II of Disc = -20 the positive integers represented are given by 2^a*5^b*Product_{j=1..PI} (pI_j)^(eI(j))*Product_{k=1..PII}(pII_k)^(eII(k)), with a and b from {0, 1}, but if PI = PII = 0 (empty products are 1) then (a, b) = (1, 0) or (1, 1), giving a(1) = 2 or a(4) = 10. The odd primes pI_j are from A033205 and the odd primes pII_j from the odd primes of A106865. The exponents of the second product satisfy: if a = 1 then PII >= 0, and if PII >=1 then Sum_{k=1..PII} eII(j) is even. If a = 0 then PII >= 1 and this sum is odd.
The neighboring numbers k (twins) begin: [42, 43], [82, 83], [122, 123] [162, 163], [202, 203], [282, 283], ...
For the solutions (X, Y) of F2 = [2, 2, 3] properly representing k = a(n) see A344234.
References
- D. A. Buell, Binary Quadratic Forms, Springer, 1989.
- A. Scholz and B. Schoeneberg, Einführung in die Zahlentheorie, Sammlung Göschen Band 5131, Walter de Gruyter, 1973.
A029718 Numbers of form 2x^2 + 2xy + 3y^2.
0, 2, 3, 7, 8, 10, 12, 15, 18, 23, 27, 28, 32, 35, 40, 42, 43, 47, 48, 50, 58, 60, 63, 67, 72, 75, 82, 83, 87, 90, 92, 98, 103, 107, 108, 112, 115, 122, 123, 127, 128, 135, 138, 140, 147, 160, 162, 163, 167, 168, 172, 175, 178, 183, 188, 192, 200, 202, 203, 207, 210
Offset: 1
Keywords
Comments
Numbers represented by quadratic form with Gram matrix [ 2, 1; 1, 3 ].
References
- H. Cohn, A second course in number theory, John Wiley & Sons, Inc., New York-London, 1962. see page 3.
Links
- N. J. A. Sloane et al., Binary Quadratic Forms and OEIS (Index to related sequences, programs, references)
Formula
List contains 0 and all positive n such that 2*A035170(n) = A028586(n) is nonzero. - Michael Somos, Oct 21 2006
Extensions
More terms from Larry Reeves (larryr(AT)acm.org), Mar 29 2000
Comments
References
Links
Crossrefs
Programs
Mathematica
PARI
Extensions