A242488
Triangle read by rows in which row n lists numbers k such that the greatest prime factor of k^2 - 2 is A038873(n), the n-th prime not congruent to 3 or 5 mod 8.
Original entry on oeis.org
2, 3, 4, 10, 6, 11, 45, 108, 5, 18, 28, 74, 156, 235, 8, 23, 39, 116, 1201, 17, 24, 58, 147, 304, 550, 2272, 390050, 7, 40, 54, 87, 101, 181, 557, 1558, 43764, 314766, 12, 59, 130, 225, 414, 1077, 1124, 2686, 3420, 4035, 32, 41, 178, 333, 698, 844, 1638, 4567, 15362, 364384
Offset: 1
Triangle of numbers k such that p is the greatest prime factor of k^2 - 2:
p\k | 1 | 2 | 3 | 4 | 5 | 6 | 7 | >= 8
------------------------------------------------------------------------
2 | 2 | | | | | | |
7 | 3 | 4 | 10 | | | | |
17 | 6 | 11 | 45 | 108 | | | |
23 | 5 | 18 | 28 | 74 | 156 | 235 | |
31 | 8 | 23 | 39 | 116 | 1201 | | |
41 | 17 | 24 | 58 | 147 | 304 | 550 | 2272 | 390050;
47 | 7 | 40 | 54 | 87 | 101 | 181 | 557 | 1558, 43764, 314766;
71 | 12 | 59 | 130 | 225 | 414 | 1077 | 1124 | 2686, 3420, 4035;
73 | 32 | 41 | 178 | 333 | 698 | 844 | 1638 | 4567, 15362, 364384;
...
6 is a term of row 3 because (6^2 - 2)/17 = 2 and 2 < 17;
11 is a term of row 3 because (11^2 - 2)/17 = 7 and 7 < 17;
45 is a term of row 3 because (45^2 - 2)/17^2 = 7 and 7 < 17;
108 is a term of row 3 because (108^2 - 2)/17 = 686 = 2*7^3 and 7 < 17.
A002334
Least positive integer x such that prime A038873(n) = x^2 - 2y^2 for some y.
Original entry on oeis.org
2, 3, 5, 5, 7, 7, 7, 11, 9, 9, 11, 13, 11, 11, 15, 13, 13, 13, 17, 15, 19, 15, 19, 17, 21, 17, 19, 17, 17, 19, 21, 25, 19, 19, 23, 25, 23, 21, 23, 21, 21, 29, 23, 25, 23, 27, 29, 23, 31, 33, 25, 29, 27, 25, 25, 27, 29, 35, 31, 31, 27, 29, 33, 31, 29, 29, 29, 29, 37, 31, 41, 35
Offset: 1
The first solutions [x(n), y(n)] are (the prime is given as first entry): [2,[2,1]], [7,[3,1]], [17,[5,2]], [23,[5,1]], [31,[7,3]], [41,[7,2]], [47,[7,1]], [71,[11,5]], [73,[9,2]], [79,[9,1]], [89,[11,4]], [97,[13,6]], [103,[11,3]], [113,[11,2]], [127,[15,7]], [137,[13,4]], [151,[13,3]], [167,[13,1]], [191,[17,7]], [193,[15,4]], [199,[19,9]], [223,[15,1]], [233,[19,8]], [239,[17,5]], [241,[21,10]], [257,[17,4]], [263,[19,7]], [271,[17,3]], ... - _Wolfdieter Lang_, Feb 17 2015
- A. J. C. Cunningham, Quadratic Partitions. Hodgson, London, 1904, p. 1.
- D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, p. 55.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
-
with(numtheory): readlib(issqr): for i from 1 to 250 do p:=ithprime(i): pmod8:=modp(p,8): if p=2 or pmod8=1 or pmod8=7 then for y from 1 do x2:=p+2*y^2: if issqr(x2) then printf("%d,",sqrt(x2)): break fi od fi od: # Pab Ter, May 08 2004
-
maxPrimePi = 200;
Reap[Do[If[MatchQ[Mod[p, 8], 1|2|7], rp = Reduce[x > 0 && y > 0 && p == x^2 - 2*y^2, {x, y}, Integers]; If[rp =!= False, xy = {x, y} /. {ToRules[rp /. C[1] -> 1]}; x0 = xy[[All, 1]] // Min // Simplify; Print[{p, xy[[1]]} ]; Sow[x0]]], {p, Prime[Range[maxPrimePi]]}]][[2, 1]] (* Jean-François Alcover, Oct 27 2019 *)
More terms from Pab Ter (pabrlos(AT)yahoo.com), May 08 2004
The name has been changed in order to be more precise and to conform with
A002335. The offset has been changed to 1. -
Wolfdieter Lang, Feb 12 2015
A002335
Least positive integer y such that A038873(n) = x^2 - 2y^2 for some x.
Original entry on oeis.org
1, 1, 2, 1, 3, 2, 1, 5, 2, 1, 4, 6, 3, 2, 7, 4, 3, 1, 7, 4, 9, 1, 8, 5, 10, 4, 7, 3, 2, 5, 8, 12, 2, 1, 9, 11, 8, 4, 7, 2, 1, 14, 6, 9, 5, 11, 13, 2, 14, 16, 4, 11, 8, 3, 2, 7, 10, 17, 12, 11, 1, 7, 13, 10, 6, 4, 3, 1, 16, 7, 20, 13, 5, 15, 4, 12, 2, 21, 14, 11, 7, 16, 13, 18, 5, 20, 9, 1, 8, 17, 14
Offset: 1
- A. J. C. Cunningham, Quadratic Partitions. Hodgson, London, 1904, p. 1.
- D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, p. 55.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
-
with(numtheory): readlib(issqr):for i from 1 to 300 do p:=ithprime(i): pmod8:=modp(p,8): if p=2 or pmod8=1 or pmod8=7 then for y from 1 do if issqr(p+2*y^2) then printf("%d,",y): break fi od fi od: # Pab Ter, Oct 22 2005
-
maxPrimePi = 200;
Reap[Do[If[MatchQ[Mod[p, 8], 1|2|7], rp = Reduce[x > 0 && y > 0 && p == x^2 - 2*y^2, {x, y}, Integers]; If[rp =!= False, xy = {x, y} /. {ToRules[rp /. C[1] -> 1]}; y0 = xy[[All, 2]] // Min // Simplify; Print[{p, xy[[1]]} ]; Sow[y0]]], {p, Prime[Range[maxPrimePi]]}]][[2, 1]] (* Jean-François Alcover, Oct 27 2019 *)
More terms from Pab Ter (pabrlos2(AT)yahoo.com), Oct 22 2005
A255235
Fundamental positive solution x = x1(n) of the first class of the Pell equation x^2 - 2*y^2 = -A038873(n), n>=1 (primes congruent to {1,2,7} mod 8).
Original entry on oeis.org
4, 1, 1, 3, 1, 3, 5, 1, 5, 7, 3, 1, 5, 7, 1, 5, 7, 11, 3, 7, 1, 13, 3, 7, 1, 9, 5, 11, 13, 9, 5, 1, 15, 17, 5, 3, 7, 13, 9, 17, 19, 1, 11, 7, 13, 5, 3, 19, 3, 1, 17, 7, 11, 19, 21, 13, 9, 1, 7, 9, 25, 15, 7, 11, 17, 21, 23, 27, 5
Offset: 1
The first pairs [x1(n), y1(n)] of the fundamental positive solutions of this first class are
(the prime A038873(n) is listed as first entry):
[2,[4, 3]], [7, [1, 2]], [17, [1, 3]],
[23, [3, 4]], [31, [1, 4]], [41, [3, 5]],
[47, [5, 6]], [71, [1, 6]], [73, [5, 7]],
[79, [7, 8]], [89, [3, 7]], [97, [1, 7]],
[103, [5, 8]], [113, [7, 9]], [127, [1, 8]],
[137, [5, 9]], [151, [7, 10]], [167, [11, 12]], [191, [3, 10]], [193, [7, 11]], [199, [1, 10]], [223, [13, 14]], [233, [3, 11]], [239, [7, 12]], [241, [1, 11]], [257, [9, 13]], [263, [5, 12]], ...
n=1: 4^2 - 2*3^2 = -2 = -A038873(1),
n=2: 1^2 - 2*2^2 = 1 - 8 = -7 = -A038873(2).
A255246
Fundamental positive solution y = y1(n) of the first class of the Pell equation x^2 - 2*y^2 = -A038873(n), n>=1 (primes congruent to {1,2,7} mod 8).
Original entry on oeis.org
3, 2, 3, 4, 4, 5, 6, 6, 7, 8, 7, 7, 8, 9, 8, 9, 10, 12, 10, 11, 10, 14, 11, 12, 11, 13, 12, 14, 15, 14, 13, 13, 17, 18, 14, 14, 15, 17, 16, 19, 20, 15, 17, 16, 18, 16, 16, 21, 17, 17, 21, 18, 19, 22, 23, 20, 19, 18, 19, 20, 26, 22, 20, 21, 23, 25, 26, 28, 21
Offset: 1
See A255235.
n = 1: 4^2 - 2*3^2 = -2 = -A038873(1),
n = 3: 1^2 - 2*3^2 = 1 - 18 = -17 = -A038873(3).
A185396
Largest number x such that the greatest prime factor of x^2-2 is A038873(n), the n-th prime not congruent to 3 or 5 mod 8.
Original entry on oeis.org
2, 10, 108, 235, 1201, 390050, 314766, 4035, 364384, 50411, 25955045, 5254864, 236558593, 16958526, 20388056, 177544434, 492981885, 2275400230, 256347346, 384902923486, 324850200677887
Offset: 1
A379348
Number of positive integers of the form k^2 - 2 whose greatest prime factor is A038873(n), the n-th prime not congruent to 3 or 5 mod 8.
Original entry on oeis.org
1, 3, 4, 6, 5, 8, 10, 10, 10, 14, 20, 22, 30, 30, 37, 42, 43, 48, 49, 64, 80
Offset: 1
Table showing n, p = A038873(n) and a(n):
1 2 1
2 7 3
3 17 4
4 23 6
5 31 5
6 41 8
7 47 10
8 71 10
9 73 10
10 79 14
...
Original entry on oeis.org
2, 7, 17, 23, 31, 41, 47, 71, 73, 79, 89, 97, 103, 113, 127, 137, 151, 167, 191, 193, 199, 223, 233, 239, 241, 257, 263, 271, 281, 311, 313, 337, 353, 359, 367, 383, 401, 409, 431, 433, 439, 449, 457, 463, 479, 487, 503, 521, 569, 577, 593, 599, 601, 607, 617
Offset: 1
A002313
Primes congruent to 1 or 2 modulo 4; or, primes of form x^2 + y^2; or, -1 is a square mod p.
Original entry on oeis.org
2, 5, 13, 17, 29, 37, 41, 53, 61, 73, 89, 97, 101, 109, 113, 137, 149, 157, 173, 181, 193, 197, 229, 233, 241, 257, 269, 277, 281, 293, 313, 317, 337, 349, 353, 373, 389, 397, 401, 409, 421, 433, 449, 457, 461, 509, 521, 541, 557, 569, 577, 593, 601, 613, 617
Offset: 1
13 is in the sequence since it is prime and 13 = 4*3 + 1. Also 13 = 2^2 + 3^2. And -1 is a square (mod 13): -1 + 2*13 = 25 = 5^2. Of course, only the first term is congruent to 2 (mod 4). - _Michael B. Porter_, Jul 04 2016
- M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 872.
- David A. Cox, "Primes of the Form x^2 + n y^2", Wiley, 1989.
- G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, p. 219, th. 251, 252.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- Zak Seidov, Table of n, a(n) for n = 1..10000 (first 1000 terms from T. D. Noe)
- Dario Alpern, Online program that calculates sum of squares representation
- N. J. A. Sloane et al., Binary Quadratic Forms and OEIS (Index to related sequences, programs, references)
- J. Todd, A problem on arc tangent relations, Amer. Math. Monthly, 56 (1949), 517-528.
- Eric Weisstein's World of Mathematics, Fermat's 4n+1 Theorem
- G. Xiao, Two squares
- Index entries for Gaussian integers and primes
-
a002313 n = a002313_list !! (n-1)
a002313_list = filter ((`elem` [1,2]) . (`mod` 4)) a000040_list
-- Reinhard Zumkeller, Feb 04 2014
-
[p: p in PrimesUpTo(700) | p mod 4 in {1,2}]; // Vincenzo Librandi, Feb 18 2015
-
with(numtheory): for n from 1 to 300 do if ithprime(n) mod 4 = 1 or ithprime(n) mod 4 = 2 then printf(`%d,`,ithprime(n)) fi; od:
# alternative
A002313 := proc(n)
option remember ;
local a;
if n = 1 then
2;
elif n = 2 then
5;
else
for a from procname(n-1)+4 by 4 do
if isprime(a) then
return a ;
end if;
end do:
end if;
end proc:
seq(A002313(n),n=1..100) ; # R. J. Mathar, Feb 01 2024
-
Select[ Prime@ Range@ 115, Mod[#, 4] != 3 &] (* Robert G. Wilson v *)
fQ[n_] := Solve[x^2 + 1 == n*y^2, {x, y}, Integers] == {}; Select[ Prime@ Range@ 115, fQ] (* Robert G. Wilson v, Dec 19 2013 *)
-
select(p->p%4!=3, primes(1000)) \\ Charles R Greathouse IV, Feb 11 2011
A068228
Primes congruent to 1 (mod 12).
Original entry on oeis.org
13, 37, 61, 73, 97, 109, 157, 181, 193, 229, 241, 277, 313, 337, 349, 373, 397, 409, 421, 433, 457, 541, 577, 601, 613, 661, 673, 709, 733, 757, 769, 829, 853, 877, 937, 997, 1009, 1021, 1033, 1069, 1093, 1117, 1129, 1153, 1201, 1213, 1237, 1249, 1297
Offset: 1
Ferenc Adorjan (fadorjan(AT)freemail.hu), Feb 22 2002
- 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.
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
- William C. Jagy and Irving Kaplansky, Positive definite binary quadratic forms that represent the same primes [Cached copy, with permission]
- Michael Penn, an example right from my number theory class., YouTube video, 2021.
- N. J. A. Sloane et al., Binary Quadratic Forms and OEIS (Index to related sequences, programs, references)
- J. B. Tunnell, Proofs of Conjectures Concerning Entry A033212, the Sequence of Primes Congruent to 1 or 19 (mod 30)
- J. Voight, Quadratic forms that represent almost the same primes, Math. Comp., Vol. 76 (2007), pp. 1589-1617.
- D. B. Zagier, Zetafunktionen und quadratische Körper, Springer, 1981.
Cf.
A068227,
A068229,
A040117,
A068231,
A068232,
A068233,
A068234,
A068235,
A139643,
A141122,
A140633,
A264732.
For a list of sequences giving numbers and/or primes represented by binary quadratic forms, see the "Binary Quadratic Forms and OEIS" link.
-
[p: p in PrimesUpTo(1400) | p mod 12 in {1}]; // Vincenzo Librandi, Jul 14 2012
For other programs see the "Binary Quadratic Forms and OEIS" link.
-
select(isprime, [seq(i,i=1..10000, 12)]); # Robert Israel, Nov 27 2015
-
Select[Prime/@Range[250], Mod[ #, 12]==1&]
Select[Range[13, 10^4, 12], PrimeQ] (* Zak Seidov, Mar 21 2011 *)
-
for(i=1,250, if(prime(i)%12==1, print(prime(i))))
-
forstep(p=13,10^4,12,isprime(p)&print(p)); \\ Zak Seidov, Mar 21 2011
Entry revised by
N. J. A. Sloane, Oct 18 2014 (Edited, merged with
A141122, 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 05 2008).
Showing 1-10 of 73 results.
Comments