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
A140633 Primes of the form 7x^2+4xy+52y^2.
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
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
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)
- John Voight, Quadratic forms that represent almost the same primes, Math. Comp., Vol. 76 (2007), pp. 1589-1617.
Crossrefs
Programs
-
Mathematica
Union[QuadPrimes2[7, 4, 52, 10000], QuadPrimes2[7, -4, 52, 10000]] (* see A106856 *)
A139490 Numbers n such that the quadratic form x^2 + n*x*y + y^2 represents exactly the same primes as the quadratic form x^2 + m*y^2 for some m.
1, 4, 6, 7, 8, 10, 14, 16, 18, 22, 26, 38, 58, 82, 86
Offset: 1
Keywords
Comments
For the numbers m see A139491.
Conjecture: This sequence is finite and complete (checked for range n<=200 and m<=500).
Examples
a(1)=1 because the primes represented by x^2+xy+y^2 are the same as the primes represented by x^2 + 3*y^2 (see A007645). The known pairs (n,m) are the following (checked for range n<=200 and m<=500): n={1, 4, 4, 6, 6, 7, 8, 8, 10, 10, 10, 14, 14, 14, 16, 18, 22, 22, 26, 38, 38} m={3, 9, 12, 8, 16, 15, 45, 60, 24, 48, 72, 24, 48, 72, 21, 40, 120, 240, 168, 120, 240}.
Links
- N. J. A. Sloane et al., Binary Quadratic Forms and OEIS (Index to related sequences, programs, references)
Crossrefs
Programs
-
Mathematica
f = 200; g = 300; h = 30; j = 100; b = {}; Do[a = {}; Do[Do[If[PrimeQ[x^2 + n y^2], AppendTo[a, x^2 + n y^2]], {x, 0, g}], {y, 1, g}]; AppendTo[b, Take[Union[a], h]], {n, 1, f}]; Print[b]; c = {}; Do[a = {}; Do[Do[If[PrimeQ[n^2 + w*n*m + m^2], AppendTo[a, n^2 + w*n*m + m^2]], {n, m, g}], {m, 1, g}]; AppendTo[c, Take[Union[a], h]], {w, 1, j}]; Print[c]; bb = {}; cc = {}; Do[Do[If[b[[p]] == c[[q]], AppendTo[bb, p]; AppendTo[cc, q]], {p, 1, f}], {q, 1, j}]; Union[cc] (*Artur Jasinski*)
Extensions
Edited by N. J. A. Sloane, Apr 25 2008
Extended by T. D. Noe, Apr 27 2009
Typo fixed by Charles R Greathouse IV, Oct 28 2009
A107006 Primes of the form 4x^2-4xy+7y^2, with x and y nonnegative.
7, 31, 79, 103, 127, 151, 199, 223, 271, 367, 439, 463, 487, 607, 631, 727, 751, 823, 919, 967, 991, 1039, 1063, 1087, 1231, 1279, 1303, 1327, 1399, 1423, 1447, 1471, 1543, 1567, 1663, 1759, 1783, 1831, 1879, 1951, 1999, 2143, 2239, 2287, 2311
Offset: 1
Comments
Discriminant=-96.
Also, primes of the form 24n+7. - Artur Jasinski, Nov 25 2007 [See the Reble link]
Also primes of the forms 4x^2+4xy+7y^2, 7x^2+6xy+15y^2, 7x^2+2xy+7y^2 and 7x^2+4xy+28y^2. See A140633. - T. D. Noe, May 19 2008
Also, primes of form u^2+6v^2 with odd v while sequence A107008 is even v. This can be seen by expressing its form as (2x-y)^2+6y^2 (where y can only be odd) while the latter is x^2+6(2y)^2. Additionally, this sequence is 7 mod 24 while the second is 1 mod 24 and together, they are the primes of form x^2+6y^2 (A033199) which are either {1,7} mod 24. - Tito Piezas III, Jan 01 2009
Links
- Vincenzo Librandi, N. J. A. Sloane and Ray Chandler, Table of n, a(n) for n = 1..10000 [First 1000 terms from Vincenzo Librandi, next 168 terms from N. J. A. Sloane]
- Don Reble, Notes on this sequence
- J. Liouville, Théorème concernant les nombres premiers de la forme 24µ + 7, Journal de mathématiques pures et appliquées 2e série, tome 4 (1859), pp. 399-400.
- N. J. A. Sloane et al., Binary Quadratic Forms and OEIS (Index to related sequences, programs, references)
Crossrefs
Cf. A124477.
Programs
-
Mathematica
a = {}; Do[If[PrimeQ[24n + 7], AppendTo[a, 24n + 7]], {n, 0, 100}]; a (* Artur Jasinski, Nov 25 2007 *) QuadPrimes2[4, -4, 7, 10000] (* see A106856 *) Select[24*Range[0,4000]+7,PrimeQ] (* Harvey P. Dale, May 13 2018 *)
Extensions
Recomputed b-file and deleted erroneous Mma program by N. J. A. Sloane, Jun 08 2014
A033199 Primes of form x^2+6*y^2.
7, 31, 73, 79, 97, 103, 127, 151, 193, 199, 223, 241, 271, 313, 337, 367, 409, 433, 439, 457, 463, 487, 577, 601, 607, 631, 673, 727, 751, 769, 823, 919, 937, 967, 991, 1009, 1033, 1039, 1063, 1087, 1129, 1153, 1201, 1231, 1249, 1279, 1297, 1303, 1321, 1327, 1399, 1423, 1447, 1471, 1489, 1543
Offset: 1
Comments
Appears to also be the primes p such that p mod 6 = 1 and Fibonacci(p) mod 6 = 1. - Gary Detlefs, May 26 2014
Links
- N. J. A. Sloane and Vincenzo Librandi, Table of n, a(n) for n = 1..10000 (The first 2000 terms were found by Vincenzo Librandi)
- David A. Cox, Primes of the Form x^2 + n y^2, Wiley, 1989, p. 36.
- N. J. A. Sloane et al., Binary Quadratic Forms and OEIS (Index to related sequences, programs, references)
Programs
-
Magma
[p: p in PrimesUpTo(1600) | NormEquation(6,p) eq true]; // Bruno Berselli, Jul 03 2016
-
Mathematica
f[x_, y_] := x^2 + 6*y^2; lst = {}; Do[p = f[x, y]; If[ PrimeQ[ p], AppendTo[ lst, p]], {y, 20}, {x, 50}]; Take[ Union[ lst], 50] (* Vladimir Joseph Stephan Orlovsky, Aug 04 2009 *)
-
PARI
select(n->n%24==1||n%24==7, primes(100)) \\ Charles R Greathouse IV, Nov 09 2012
Formula
Same as primes congruent to 1 or 7 mod 24. See e.g. Cox, p. 36.
a(n) ~ 4n log n. - Charles R Greathouse IV, Nov 09 2012
Extensions
Removed defective Mma program; extended the b-file using Charles R Greathouse's PARI program. - N. J. A. Sloane, Jun 06 2014
A111174 Numbers k such that 24*k + 1 is prime.
3, 4, 8, 10, 13, 14, 17, 18, 19, 24, 25, 28, 32, 39, 42, 43, 47, 48, 50, 52, 54, 55, 62, 67, 69, 73, 74, 75, 78, 83, 84, 87, 88, 89, 90, 95, 99, 103, 105, 108, 109, 112, 113, 118, 119, 123, 125, 127, 130, 132, 134, 138, 140, 143, 144, 147, 153, 154, 157, 158, 162
Offset: 1
Keywords
Comments
Half of the even terms in A110801. - R. J. Mathar, Jan 31 2011
Examples
If k=99 then 24*k + 1 = 2377 (prime).
Links
- Daniel Starodubtsev, Table of n, a(n) for n = 1..10000
Programs
-
Magma
[ n: n in [0..1500] | IsPrime(24*n + 1) ]; // Vincenzo Librandi, Jan 31 2011
-
Mathematica
Select[Range[200],PrimeQ[24#+1]&] (* Harvey P. Dale, Apr 01 2018 *)
-
PARI
is(n)=isprime(24*n+1) \\ Charles R Greathouse IV, Feb 20 2017
Extensions
More terms from Christian G. Bower, Jan 06 2006
A140444 Primes congruent to 1 (mod 14).
29, 43, 71, 113, 127, 197, 211, 239, 281, 337, 379, 421, 449, 463, 491, 547, 617, 631, 659, 673, 701, 743, 757, 827, 883, 911, 953, 967, 1009, 1051, 1093, 1163, 1289, 1303, 1373, 1429, 1471, 1499, 1583, 1597, 1667, 1709, 1723, 1877, 1933, 2003, 2017, 2087
Offset: 1
Comments
From Federico Provvedi, May 24 2018: (Start)
Also primes congruent to 1 (mod 7).
For every prime p > 2, primes congruent to 1 (mod p) are also congruent to 1 (mod 2*p).
Conjecture: The monic polynomial P(x) = (x+1)^7/x - 1/x = ((x+1)^7-1)/x is irreducible but factorizable over Galois field (mod a(n)) with exactly 6 distinct irreducible factors of degree 1. Examples:
P(x) == (5 + x) (6 + x) (7 + x) (10 + x) (14 + x) (23 + x) (mod 29)
P(x) == (3 + x) (9 + x) (23 + x) (28 + x) (33 + x) (40 + x) (mod 43)
P(x) == (24 + x) (27 + x) (35 + x) (40 + x) (42 + x) (52 + x) (mod 71)
P(x) == (5 + x) (8 + x) (65 + x) (84 + x) (86 + x) (98 + x) (mod 113)
... (End).
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
- Jorma K. Merikoski, Pentti Haukkanen, and Timo Tossavainen, The congruence x^n = -a^n (mod m): Solvability and related OEIS sequences, Notes. Num. Theor. Disc. Math. (2024) Vol. 30, No. 3, 516-529. See p. 526.
Crossrefs
A090613 gives prime index.
Cf. A090614.
Cf. A131877.
Primes congruent to 1 (mod k): A000040 (k=1), A065091 (k=2), A002476 (k=3 and 6), A002144 (k=4), A030430 (k=5 and 10), this sequence (k=7 and 14), A007519 (k=8), A061237 (k=9 and 18), A141849 (k=11 and 22), A068228 (k=12), A268753 (k=13 and 26), A132230 (k=15 and 30), A094407 (k=16), A129484 (k=17 and 34), A141868 (k=19 and 38), A141881 (k=20), A124826 (k=21 and 42), A212374 (k=23 and 46), A107008 (k=24), A141927 (k=25 and 50), A141948 (k=27 and 54), A093359 (k=28), A141977 (k=29 and 58), A142005 (k=31 and 62), A133870 (k=32).
Programs
-
GAP
Filtered(Filtered([1..2300],n->n mod 14=1),IsPrime); # Muniru A Asiru, Jun 27 2018
-
Magma
[p: p in PrimesUpTo(3000)|p mod 14 in {1}]; // Vincenzo Librandi, Dec 18 2010
-
Maple
select(isprime,select(n->modp(n,14)=1,[$1..2300])); # Muniru A Asiru, Jun 27 2018
-
Mathematica
Select[Prime[Range[500]], Mod[#, 14] == 1 &] (* Harvey P. Dale, Mar 21 2011 *)
-
PARI
is(n)=isprime(n) && n%14==1 \\ Charles R Greathouse IV, Jul 02 2016
Formula
a(n) ~ 6n log n. - Charles R Greathouse IV, Jul 02 2016
Extensions
Simpler definition from N. J. A. Sloane, Jul 11 2008
A139492 Primes of the form x^2 + 5x*y + y^2 for x and y nonnegative.
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
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.
Links
- Peter Luschny, Binary Quadratic Forms
- N. J. A. Sloane et al., Binary Quadratic Forms and OEIS: Index to related sequences, programs, references. OEIS wiki, June 2014.
- D. B. Zagier, Zetafunktionen und quadratische Körper, Springer, 1981.
Crossrefs
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
A139502 Primes of the form x^2 + 22x*y + y^2 for x and y nonnegative.
241, 409, 601, 769, 1009, 1129, 1201, 1249, 1321, 1489, 1609, 1801, 2089, 2161, 2281, 2521, 2689, 3001, 3049, 3121, 3169, 3361, 3529, 3769, 3889, 4129, 4201, 4441, 4561, 4729, 4801, 4969, 5209, 5281, 5449, 5521, 5569, 5641, 5689, 5881, 6121, 6361, 6481
Offset: 1
Comments
Also primes of the form x^2 + 120y^2. - T. D. Noe, Apr 29 2008
In base 12, the sequence is 181, 2X1, 421, 541, 701, 7X1, 841, 881, 921, X41, E21, 1061, 1261, 1301, 13X1, 1561, 1681, 18X1, 1921, 1981, 1X01, 1E41, 2061, 2221, 2301, 2481, 2521, 26X1, 2781, 28X1, 2941, 2X61, 3021, 3081, 31X1, 3241, 3281, 3321, 3361, 34X1, 3661, 3821, 3901, where X is 10 and E is 11. Moreover, the discriminant is 340. - Walter Kehowski, Jun 01 2008
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
- N. J. A. Sloane et al., Binary Quadratic Forms and OEIS (Index to related sequences, programs, references)
Crossrefs
Programs
-
Magma
[ p: p in PrimesUpTo(7000) | p mod 120 in {1, 49}]; // Vincenzo Librandi, Jul 28 2012
-
Mathematica
QuadPrimes2[1, 0, 120, 10000] (* see A106856 *)
Formula
The primes are congruent to {1, 49} (mod 120). - T. D. Noe, Apr 29 2008
A334832 Numbers whose squarefree part is congruent to 1 (mod 24).
1, 4, 9, 16, 25, 36, 49, 64, 73, 81, 97, 100, 121, 144, 145, 169, 193, 196, 217, 225, 241, 256, 265, 289, 292, 313, 324, 337, 361, 385, 388, 400, 409, 433, 441, 457, 481, 484, 505, 529, 553, 576, 577, 580, 601, 625, 649, 657, 673, 676, 697, 721, 729, 745, 769, 772, 784, 793, 817, 841
Offset: 1
Comments
Closed under multiplication.
The sequence forms a subgroup of the positive integers under the commutative operation A059897(.,.). A059897 has a relevance to squarefree parts that arises from the identity A007913(k*m) = A059897(A007913(k), A007913(m)), where A007913(n) is the squarefree part of n.
The subgroup is one of 8 A059897(.,.) subgroups of the form {k : A007913(k) == 1 (mod m)}. The list seems complete, in anticipation of proof that such sets form subgroups only when m is a divisor of 24 (based on the property described by A. G. Astudillo in A018253). This sequence might be viewed as primitive with respect to the other 7, as the latter correspond to subgroups of its quotient group, in the sense that each one (as a set) is also a union of cosets described below. The 7 include A003159 (m=2), A055047 (m=3), A277549 (m=4), A234000 (m=8) and the trivial A000027 (m=1).
The subgroup has 32 cosets. For each i in {1, 5, 7, 11, 13, 17, 19, 23}, j in {1, 2, 3, 6} there is a coset {n : n = k^2 * (24m + i) * j, k >= 1, m >= 0}. The divisors of 2730 = 2*3*5*7*13 form a transversal. (11, clearly not such a divisor, is in the same coset as 35 = 11 + 24; 17, 19, 23 are in the same cosets as 65, 91, 455 respectively.)
The asymptotic density of this sequence is 1/16. - Amiram Eldar, Mar 08 2021
Examples
The squarefree part of 26 is 26, which is congruent to 2 (mod 24), so 26 is not in the sequence. The squarefree part of 292 = 2^2 * 73 is 73, which is congruent to 1 (mod 24), so 292 is in the sequence.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
- Eric Weisstein's World of Mathematics, Quotient Group.
- Eric Weisstein's World of Mathematics, Right Transversal.
Crossrefs
Programs
-
Mathematica
Select[Range[850], Mod[Sqrt[#] /. (c_ : 1)*a_^(b_ : 0) :> (c*a^b)^2, 24] == 1 &] (* Michael De Vlieger, Jun 24 2020 *)
-
PARI
isok(m) = core(m) % 24 == 1; \\ Peter Munn, Jun 21 2020
-
Python
from sympy import integer_log def A334832(n): def bisection(f,kmin=0,kmax=1): while f(kmax) > kmax: kmax <<= 1 kmin = kmax >> 1 while kmax-kmin > 1: kmid = kmax+kmin>>1 if f(kmid) <= kmid: kmax = kmid else: kmin = kmid return kmax def f(x): return n+x-sum((x//(i<<(j<<1))-1)//24+1 for i in (9**k for k in range(integer_log(x,9)[0]+1)) for j in range((x//i>>1).bit_length()+1)) return bisection(f,n,n) # Chai Wah Wu, Mar 21 2025
Formula
{a(n)} = {n : n = k^2 * (24m + 1), k >= 1, m >= 0}.
Comments
References
Links
Crossrefs
Programs
Mathematica
PARI
Extensions