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
A255233
Fundamental positive solution x = x2(n) of the second class of the Pell equation x^2 - 2*y^2 = -A007522(n), n >= 1 (primes congruent to 7 mod 8).
Original entry on oeis.org
5, 7, 13, 9, 21, 11, 17, 29, 19, 15, 31, 37, 17, 27, 33, 23, 29, 21, 41, 47, 37, 23, 43, 33, 49, 55, 51, 31, 41, 69, 53, 29, 43, 59, 35, 31, 45, 61, 41, 67, 85, 57, 47, 63, 43, 53, 35, 75, 93, 37, 71, 61, 83, 47, 89, 39, 73, 53, 63, 79, 49, 85, 69, 97, 103, 109, 55, 65, 47, 77, 67, 83, 49
Offset: 1
The first pairs [x2(n), y2(n)] of the fundamental positive solutions of this second class are (the prime A007522(n) appears as first entry):
[7, [5, 4]], [23, [7, 6]], [31, [13, 10]],
[47, [9, 8]], [71, [21, 16]], [79, [11, 10]], [103, [17, 14]], [127, [29, 22]],
[151, [19, 16]], [167, [15, 14]],
[191, [31, 24]], [199, [37, 28]],
[223, [17, 16]], [239, [27, 22]],
[263, [33, 26]], [271, [23, 20]],
[311, [29, 24]], [359, [21, 20]],
[367, [41, 32]], [383, [47, 36]],
[431, [37, 30]], [439, [23, 22]],
[463, [43, 34]], [479, [33, 28]], ...
n= 4: 9^2 - 2*(2*4)^2 = -47 = -A007522(4).
a(4) = -(3*5 - 4*(2*3)) = 24 - 15 = 9.
-
apply( {A255233(n, p=A007522(n))=Set(abs(qfbsolve(Qfb(-1, 0, 2), p, 1)))[1]*[-3,4]~}, [1..88]) \\ The 2nd optional arg allows to directly specify the prime. - M. F. Hasler, May 22 2025
A023231
Primes p such that 8*p + 7 is also prime.
Original entry on oeis.org
2, 3, 5, 23, 29, 47, 53, 59, 89, 107, 113, 137, 179, 197, 227, 233, 257, 263, 293, 317, 359, 389, 419, 509, 557, 587, 593, 599, 617, 653, 659, 683, 839, 857, 863, 887, 947, 977, 1013, 1097, 1103, 1163, 1193, 1217, 1223, 1229, 1259, 1277, 1283, 1307, 1319, 1409
Offset: 1
For p = 3, 8*p + 7 = 31;
for p = 179, 8*p + 7 = 1439.
-
[n: n in PrimesUpTo(1500) | IsPrime(8*n+7)]; // Vincenzo Librandi, Nov 20 2010
-
a := proc (n) if isprime(n) = true and isprime(8*n+7) = true then n else end if end proc: seq(a(n), n = 1 .. 1500); # Emeric Deutsch, Dec 30 2008
-
Select[Prime@Range@500, PrimeQ[8 # + 7] &] (* Vincenzo Librandi, May 19 2014 *)
A254766
Fundamental positive solution x = x2(n) of the second class of the Pell equation x^2 - 2*y^2 = A007522(n), n >=1 (primes congruent to 7 mod 8).
Original entry on oeis.org
5, 11, 9, 17, 13, 23, 21, 17, 27, 35, 23, 21, 41, 31, 29, 39, 37, 53, 33, 31, 41, 59, 39, 49, 37, 35, 43, 63, 53, 37, 49, 77, 59, 47, 75, 83, 65, 53, 73, 51, 45, 61, 71, 59, 79, 69, 95, 55, 49, 101
Offset: 1
The first pairs [x2(n), y2(n)] of the fundamental positive solutions of the second class are (we list the prime A007522(n) as first entry): [7,[5,3]], [23,[11,7]], [31,[9,5]], [47,[17,11]], [71,[13,7]], [79,[23,15]], [103,[21,13]], [127,[17,9]], [151,[27,17]], [167,[35,23]], [191,[23,13]], [199,[21,11]], [223,[41,27]], [239,[31,19]], [263,[29,17]], [271,[39,25]], ...
A023294
Primes that remain prime through 3 iterations of function f(x) = 8x + 7.
Original entry on oeis.org
659, 2549, 5189, 6269, 7229, 7949, 9209, 11579, 16139, 18089, 22739, 25589, 26099, 26339, 29009, 30689, 40289, 51719, 55799, 59669, 60689, 61379, 63599, 69959, 70229, 74609, 85829, 94949, 95819, 102539, 109589, 118169, 121469, 135599, 136889
Offset: 1
A023322
Primes that remain prime through 4 iterations of function f(x) = 8x + 7.
Original entry on oeis.org
7949, 25589, 55799, 61379, 69959, 70229, 74609, 174569, 188369, 204719, 220469, 225629, 233759, 250919, 286619, 363659, 552749, 592139, 658349, 735419, 783269, 827549, 931949, 1018889, 1065839, 1126319, 1132739, 1187939, 1215629, 1378529
Offset: 1
-
[n: n in [1..5000000] | IsPrime(n) and IsPrime(8*n+7) and IsPrime(64*n+63) and IsPrime(512*n+511) and IsPrime(4096*n+4095)] // Vincenzo Librandi, Aug 04 2010
-
rp4Q[p_]:=AllTrue[Rest[NestList[8#+7&,p,4]],PrimeQ]; Select[Prime[Range[110000]],rp4Q] (* Harvey P. Dale, Aug 03 2023 *)
A023350
Primes that remain prime through 5 iterations of function f(x) = 8x + 7.
Original entry on oeis.org
25589, 220469, 225629, 286619, 783269, 1215629, 1407389, 1542029, 1642919, 2329469, 2776979, 3104159, 4082759, 4229129, 5405999, 5905619, 6548849, 6862859, 7681409, 7904669, 8623799, 8971049, 9599309, 9658469, 9725039, 11420579
Offset: 1
-
[n: n in [1..19000000] | IsPrime(n) and IsPrime(8*n+7) and IsPrime(64*n+63) and IsPrime(512*n+511) and IsPrime(4096*n+4095) and IsPrime(32768*n+32767)]; // Vincenzo Librandi, Aug 05 2010
-
i5Q[p_]:=AllTrue[Rest[NestList[8#+7&,p,5]],PrimeQ]; Select[Prime[Range[760000]],i5Q] (* Harvey P. Dale, Jul 05 2025 *)
A153235
Numbers n such that 8*n+7 is not prime.
Original entry on oeis.org
1, 4, 6, 7, 10, 11, 13, 14, 16, 17, 19, 21, 22, 25, 26, 28, 30, 31, 34, 35, 36, 37, 39, 40, 41, 42, 43, 46, 48, 49, 50, 51, 52, 55, 56, 58, 61, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 76, 77, 79, 81, 82, 83, 84, 85, 86, 87, 88, 91, 94, 95, 96, 97, 98, 99, 100, 101
Offset: 1
Distribution of the terms in the following triangular array:
*;
1,*;
*,*,*;
*,*,7,*;
*,6,*,*,*;
4,*,*,*,17,*;
*,*,*,16,*,*,*;
*,*,14,*,*,*,31,*;
*,11,*,*,*,30,*,*,*;
7,*,*,*,28,*,*,*,49,*:
*,*,*,25,*,*,*,48,*,*,*;
*,*,21,*,*,*,46,*,*,*,71,*; etc.
where * marks the non-integer values of (2*h*k + k + h - 3)/4 with h >= k >= 1. - _Vincenzo Librandi_, Jan 15 2013
A153236
Numbers n such that 8*n + 3 is not prime.
Original entry on oeis.org
3, 4, 6, 9, 11, 12, 14, 15, 18, 19, 21, 23, 24, 25, 27, 29, 30, 32, 33, 34, 36, 37, 39, 40, 42, 44, 45, 46, 48, 49, 50, 51, 53, 54, 56, 57, 59, 60, 63, 64, 66, 67, 69, 72, 74, 75, 76, 78, 79, 81, 83, 84, 87, 88, 89, 90, 91, 93, 94, 95, 96, 97
Offset: 1
Distribution of the terms in the following triangular array:
*;
*,*;
*,4,*;
3,*,*,*;
*,*,*,12,*;
*,*,11,*,*,*;
*,9,*,*,*,24,*;
6,*,*,*,23,*,*,*;
*,*,*,21,*,*,*,40,*;
*,*,18,*,*,*,39,*,*,*;
*,14,*,*,*,37,*,*,*,60,*;
9,*,*,*,34,*,*,*,59,*,*,*; etc.
where * marks the non-integer values of (2*h*k + k + h - 1)/4 with h >= k >= 1. - _Vincenzo Librandi_, Jan 15 2013
A244087
Numbers n such that 4*n+3 and 8*n+7 are prime.
Original entry on oeis.org
0, 2, 5, 20, 32, 44, 47, 59, 62, 89, 104, 107, 110, 122, 164, 170, 179, 185, 227, 254, 257, 275, 305, 359, 362, 374, 377, 389, 395, 452, 482, 500, 509, 515, 584, 587, 599, 614, 635, 674, 704, 725, 734, 740, 755, 824, 839, 872, 884, 905, 944, 950, 962, 965, 977
Offset: 1
-
[n: n in [0..1000] | IsPrime(4*n+3) and IsPrime(8*n+7)];
-
Select[Range[0, 1500], PrimeQ[4 # + 3]&&PrimeQ[8 # + 7] &]
Showing 1-10 of 10 results.
Comments