A255247
Fundamental positive solution x = x2(n) of the second class of the Pell equation x^2 - 2*y^2 = -A001132(n), n>=1 (primes congruent to {1,7} mod 8).
Original entry on oeis.org
5, 9, 7, 13, 11, 9, 21, 13, 11, 19, 25, 17, 15, 29, 21, 19, 15, 31, 23, 37, 17, 35, 27, 41, 25, 33, 23, 21, 29, 37, 49, 23, 21, 41, 47, 39, 29, 37, 25, 23, 57, 35, 43, 33, 49, 55, 27, 59, 65, 33, 51, 43, 31, 29, 41, 49, 69, 55, 53, 29, 43, 59, 51, 41, 37, 35
Offset: 1
The first pairs [x1(n), y1(n)] of the fundamental positive solutions of this first class are (the prime A001132(n) is listed as first entry):
[7, [5, 4]], [17, [9, 7]], [23, [7, 6]],
[31, [13, 10]], [41, [11, 9]], [47, [9, 8]],
[71, [21, 16]], [73, [13, 11]], [79, [11, 10]],
[89, [19, 15]], [97, [25, 19]], [103, [17, 14]],
[113, [15, 13]], [127, [29, 22]],
[137, [21, 17]], [151, [19, 16]],
[167, [15, 14]], [191, [31, 24]],
[193, [23, 19]], [199, [37, 28]],
[223, [17, 16]], [233, [35, 27]],
[239, [27, 22]], [241, [41, 31]], ...
n = 1: 5^2 - 2*4^2 = 25 - 32 = -7 = -A001132(1).
a(3) = -(3*3 - 4*4) = 16 - 9 = 7.
A095013
Number of 8k+-1 primes (A001132) in range [2^n,2^(n+1)].
Original entry on oeis.org
0, 1, 0, 3, 2, 8, 10, 22, 35, 67, 126, 233, 438, 793, 1525, 2825, 5391, 10192, 19332, 36739, 70163, 133983, 256877, 492962, 946938, 1822776, 3513544, 6780795, 13102754, 25349101, 49090527, 95168113, 184659769, 358635803, 697092152, 1356042601, 2639892053, 5142809798
Offset: 1
A255248
Fundamental positive solution y = y2(n) of the second class of the Pell equation x^2 - 2*y^2 = -A001132(n), n>=1 (primes congruent to {1,7} mod 8).
Original entry on oeis.org
4, 7, 6, 10, 9, 8, 16, 11, 10, 15, 19, 14, 13, 22, 17, 16, 14, 24, 19, 28, 16, 27, 22, 31, 21, 26, 20, 19, 24, 29, 37, 21, 20, 32, 36, 31, 25, 30, 23, 22, 43, 29, 34, 28, 38, 42, 25, 45, 49, 29, 40, 35, 28, 27, 34, 39, 52, 43, 42, 28, 36, 46, 41, 35, 33, 32
Offset: 1
See A255247.
a(4) = -(2*1 - 3*4) = 12 - 2 = 10.
n=4: 13^2 - 2*10^2 = 169 - 200 = -31 = -A001132(4).
A254930
Fundamental positive solution x = x2(n) of the second class of the Pell equation x^2 - 2*y^2 = A001132(n), n >= 1 (primes congruent to 1 or 7 mod 8).
Original entry on oeis.org
5, 7, 11, 9, 13, 17, 13, 19, 23, 17, 15, 21, 25, 17, 23, 27, 35, 23, 29, 21, 41, 25, 31, 23, 35, 29, 39, 43, 37, 31, 27, 49, 53, 33, 31, 37, 47, 41, 55, 59, 31, 45, 39, 49, 37, 35, 61, 37, 35
Offset: 1
n = 3: 11^2 - 2*7^2 = 23 = A001132(3) = A007522(2).
The first pairs of these second class solutions [x2(n), y2(n)] are (a star indicates primes congruent to 1 (mod 8)):
n A001132(n) a(n) A254931(n)
1 7 5 3
2 17 * 7 4
3 23 11 7
4 31 9 5
5 41 * 13 8
6 47 17 11
7 71 13 7
8 73 * 19 12
9 89 * 17 10
10 97 * 15 8
11 103 21 13
12 113 * 25 16
13 127 17 9
14 137 * 23 14
15 151 27 17
16 167 35 23
17 191 23 13
18 193 * 29 18
19 199 21 11
20 223 41 27
...
-
Reap[For[p = 2, p < 1000, p = NextPrime[p], If[MatchQ[Mod[p, 8], 1|7], rp = Reduce[x > 0 && y > 0 && x^2 - 2 y^2 == p, {x, y}, Integers]; If[rp =!= False, xy = {x, y} /. {ToRules[rp /. C[1] -> 1]}; x2 = xy[[-1, 1]] // Simplify; Print[x2]; Sow[x2]]]]][[2, 1]] (* Jean-François Alcover, Oct 28 2019 *)
A254931
Fundamental positive solution y = y2(n) of the second class of the Pell equation x^2 - 2*y^2 = A001132(n), n >= 1, (primes congruent to 1 or 7 mod 8).
Original entry on oeis.org
3, 4, 7, 5, 8, 11, 7, 12, 15, 10, 8, 13, 16, 9, 14, 17, 23, 13, 18, 11, 27, 14, 19, 12, 22, 17, 25, 28, 23, 18, 14, 32, 35, 19, 17, 22, 30, 25, 36, 39, 16, 28, 23, 31, 21, 19, 40, 20, 18, 38
Offset: 1
a(4) = 2*7 - 3*3 = 5.
A254930(4)^2 - 2*a(4)^2 = 9^2 - 2*5^2 = 31 = A001132(4) = A007522(3).
See A254930 for the first pairs (x2(n), y2(n)).
-
Reap[For[p = 2, p < 1000, p = NextPrime[p], If[MatchQ[Mod[p, 8], 1|7], rp = Reduce[x > 0 && y > 0 && x^2 - 2 y^2 == p, {x, y}, Integers]; If[rp =!= False, xy = {x, y} /. {ToRules[rp /. C[1] -> 1]}; y2 = xy[[-1, 2]] // Simplify; Print[y2]; Sow[y2]]]]][[2, 1]] (* Jean-François Alcover, Oct 28 2019 *)
A007519
Primes of form 8n+1, that is, primes congruent to 1 mod 8.
Original entry on oeis.org
17, 41, 73, 89, 97, 113, 137, 193, 233, 241, 257, 281, 313, 337, 353, 401, 409, 433, 449, 457, 521, 569, 577, 593, 601, 617, 641, 673, 761, 769, 809, 857, 881, 929, 937, 953, 977, 1009, 1033, 1049, 1097, 1129, 1153, 1193, 1201, 1217, 1249, 1289, 1297, 1321, 1361
Offset: 1
a(1) = 17 = 2 * 8 + 1 = (10001)_2. All numbers m from [0, 17) with the Hamming distance D(m, 17) = 2 are 0, 3, 5, 9. For m = 0, we can take h = 3, since 3 is drawn from (0, 17) and D(0, 3) = 2; for m = 3, we can take h = 5, since 5 from (3, 17) and D(3, 5) = 2; for m = 5, we can take h = 6, since 6 from (5, 17) and D(5, 6) = 2; for m = 9, we can take h = 10, since 10 is drawn from (9, 17) and D(9, 10) = 2. - _Vladimir Shevelev_, Apr 18 2012
- Milton Abramowitz and Irene A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
- Z. I. Borevich and I. R. Shafarevich, Number Theory.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 261.
- Ray Chandler, Table of n, a(n) for n = 1..10000 (first 1000 terms from T. D. Noe)
- Milton Abramowitz and Irene A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
- Ben Brubaker, 18.781, Fall 2007 Problem Set 5: Solutions to Selected Problems, MIT (2007).
- Peter Luschny, Binary Quadratic Forms
- 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. 521.
- N. J. A. Sloane et al., Binary Quadratic Forms and OEIS (Index to related sequences, programs, references)
- D. B. Zagier, Zetafunktionen und quadratische Körper, Springer, 1981.
For a list of sequences giving numbers and/or primes represented by binary quadratic forms, see the "Binary Quadratic Forms and OEIS" link.
-
a007519 n = a007519_list !! (n-1)
a007519_list = filter ((== 1) . a010051) [1,9..]
-- Reinhard Zumkeller, Mar 06 2012
-
[p: p in PrimesUpTo(2000) | p mod 8 eq 1 ]; // Vincenzo Librandi, Aug 21 2012
-
Select[1 + 8 Range@ 170, PrimeQ] (* Robert G. Wilson v *)
-
forprime(p=2,1e4,if(p%8==1,print1(p", "))) \\ Charles R Greathouse IV, Jun 16 2011
-
forprimestep(p=17,10^4,8, print1(p", ")) \\ Charles R Greathouse IV, Jul 17 2024
-
lista(nn)= my(vpr = []); for (x = 0, nn, y = 0; while ((v = x^2+6*x*y+y^2) < nn, if (isprime(v), if (! vecsearch(vpr, v), vpr = concat(vpr, v); vpr = vecsort(vpr););); y++;);); vpr; \\ Michel Marcus, Feb 01 2014
-
A007519_upto(N, start=1)=select(t->t%8==1,primes([start,N]))
#A7519=A007519_upto(10^5)
A007519(n)={while(#A7519A007519_upto(N*3\2, N+1))); A7519[n]} \\ M. F. Hasler, May 22 2025
-
# uses[binaryQF]
# The function binaryQF is defined in the link 'Binary Quadratic Forms'.
Q = binaryQF([1, 4, -4])
print(Q.represented_positives(1361, 'prime')) # Peter Luschny, Jan 26 2017
A007522
Primes of the form 8n+7, that is, primes congruent to -1 mod 8.
Original entry on oeis.org
7, 23, 31, 47, 71, 79, 103, 127, 151, 167, 191, 199, 223, 239, 263, 271, 311, 359, 367, 383, 431, 439, 463, 479, 487, 503, 599, 607, 631, 647, 719, 727, 743, 751, 823, 839, 863, 887, 911, 919, 967, 983, 991, 1031, 1039, 1063, 1087, 1103, 1151
Offset: 1
- Z. I. Borevich and I. R. Shafarevich, Number Theory. Academic Press, NY, 1966.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- D. B. Zagier, Zetafunktionen und quadratische Körper, Springer, 1981.
- Ray Chandler, Table of n, a(n) for n = 1..10000 (first 1000 terms from T. D. Noe)
- Milton Abramowitz and Irene A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
- N. J. A. Sloane et al., Binary Quadratic Forms and OEIS (Index to related sequences, programs, references)
-
a007522 n = a007522_list !! (n-1)
a007522_list = filter ((== 1) . a010051) a004771_list
-- Reinhard Zumkeller, Jan 29 2013
-
[p: p in PrimesUpTo(2000) | p mod 8 eq 7]; // Vincenzo Librandi, Jun 26 2014
-
select(isprime, [seq(i,i=7..10000,8)]); # Robert Israel, Nov 22 2016
-
Select[8Range[200] - 1, PrimeQ] (* Alonso del Arte, Nov 07 2016 *)
-
(A007522(m) = local(p, s, x, z); forprime(p = 3, m, s = []; for(x = 0, p-1, if(x^4%p == 2%p, s = concat(s, [x]))); z = matsize(s)[2]; if(z == 2, print1(p, ", ")))); A007522(1400) \\ Does not return a(m) but prints all terms <= m. - Edited to make it executable by M. F. Hasler, May 22 2025.
-
A007522_upto(N, start=1)=select(p->p%8==7, primes([start, N]))
#A7522=A007522_upto(10^5)
A007522(n)={while(#A7522A007522_upto(N*3\2, N+1))); A7522[n]} \\ M. F. Hasler, May 22 2025
A038873
Primes p such that 2 is a square mod p; or, primes congruent to {1, 2, 7} mod 8.
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
- W. J. LeVeque, Topics in Number Theory. Addison-Wesley, Reading, MA, 2 vols., 1956, Vol. 1, Theorem 5-5, p. 68.
For primes p such that x^m == 2 mod p has a solution for m = 2,3,4,5,6,7,... see
A038873,
A040028,
A040098,
A040159,
A040992,
A042966, ...
-
[ p: p in PrimesUpTo(617) | IsSquare(R!2) where R:=ResidueClassRing(p) ]; // Klaus Brockhaus, Dec 02 2008
-
seq(`if`(member(ithprime(n) mod 8, {1,2,7}),ithprime(n),NULL),n=1..113); # Nathaniel Johnston, Jun 26 2011
-
fQ[n_] := MemberQ[{1, 2, 7}, Mod[n, 8]]; Select[ Prime[Range[114]], fQ] (* Robert G. Wilson v, Oct 18 2011 *)
-
is(n)=isprime(n) && issquare(Mod(2,n)) \\ Charles R Greathouse IV, Apr 23 2015
-
is(n)=abs(centerlift(Mod(n,8)))<3 && isprime(n) \\ Charles R Greathouse IV, Nov 14 2017
A047522
Numbers that are congruent to {1, 7} mod 8.
Original entry on oeis.org
1, 7, 9, 15, 17, 23, 25, 31, 33, 39, 41, 47, 49, 55, 57, 63, 65, 71, 73, 79, 81, 87, 89, 95, 97, 103, 105, 111, 113, 119, 121, 127, 129, 135, 137, 143, 145, 151, 153, 159, 161, 167, 169, 175, 177, 183, 185, 191, 193, 199, 201, 207, 209, 215, 217, 223, 225, 231, 233
Offset: 1
- L. B. W. Jolley, Summation of Series, Dover Publications, 1961, p. 16.
Cf.
A001132,
A014494,
A056575,
A010709,
A074378,
A047336,
A056020,
A005408,
A047209,
A007310,
A090771,
A175885,
A091998,
A175886,
A175887,
A058529,
A047621,
A179260,
A352125.
-
a047522 n = a047522_list !! (n-1)
a047522_list = 1 : 7 : map (+ 8) a047522_list
-- Reinhard Zumkeller, Jan 07 2012
-
Select[Range[1, 191, 2], JacobiSymbol[2, # ]==1&]
-
a(n)=4*n-2+(-1)^n \\ Charles R Greathouse IV, Sep 24 2015
A058529
Numbers whose prime factors are all congruent to +1 or -1 modulo 8.
Original entry on oeis.org
1, 7, 17, 23, 31, 41, 47, 49, 71, 73, 79, 89, 97, 103, 113, 119, 127, 137, 151, 161, 167, 191, 193, 199, 217, 223, 233, 239, 241, 257, 263, 271, 281, 287, 289, 311, 313, 329, 337, 343, 353, 359, 367, 383, 391, 401, 409, 431, 433, 439, 449, 457, 463, 479, 487
Offset: 1
William Bagby (bagsbee(AT)aol.com), Dec 24 2000
- B Berggren, Pytagoreiska trianglar. Tidskrift för elementär matematik, fysik och kemi, 17:129-139, 1934.
- Olaf Delgado-Friedrichs and Michael O’Keeffe, Edge-transitive lattice nets, Acta Cryst. (2009). A65, 360-363.
- Ray Chandler, Table of n, a(n) for n = 1..10000 (first 1000 terms from T. D. Noe)
- F. Barnes, primitive Pythagorean triangles where a-b is a constant.
- Johannes Boot, Draft English translation of B Berggren's (1934) article "Pytagoreiska Trianglar", ResearchGate 2017.
- K. S. Brown, Pythagorean graphs.
- O. Delgado-Friedrichs and M. O'Keeffe, Edge-transitive lattice nets, Acta Cryst. A, A65 (2009), 360-363.
- B. Frénicle, Méthode pour trouver la solution des problèmes par les exclusions, 44 pages (see p. 31). In Divers ouvrages de mathematique .. Par Messieurs de l'Academie Royale des Sciences, in-fol, 6+518+1PP, Paris, 1693. - _Paul Curtz_, Sep 06 2008
-
a058529 n = a058529_list !! (n-1)
a058529_list = filter (\x -> all (`elem` (takeWhile (<= x) a001132_list))
$ a027748_row x) [1..]
-- Reinhard Zumkeller, Jan 29 2013
-
Select[Range[500], Union[Abs[Mod[Transpose[FactorInteger[#]][[1]], 8, -1]]] == {1} &] (* T. D. Noe, Feb 07 2012 *)
-
is(n)=my(f=factor(n)[,1]%8); for(i=1,#f, if(f[i]!=1 && f[i]!=7, return(0))); 1 \\ Charles R Greathouse IV, Aug 01 2016
Duplicated comment removed and name rewritten by
Wolfdieter Lang, Feb 17 2015
Showing 1-10 of 41 results.
Comments