A007522 Primes of the form 8n+7, that is, primes congruent to -1 mod 8.
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
References
- 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.
Links
- 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)
Crossrefs
Programs
-
Haskell
a007522 n = a007522_list !! (n-1) a007522_list = filter ((== 1) . a010051) a004771_list -- Reinhard Zumkeller, Jan 29 2013
-
Magma
[p: p in PrimesUpTo(2000) | p mod 8 eq 7]; // Vincenzo Librandi, Jun 26 2014
-
Maple
select(isprime, [seq(i,i=7..10000,8)]); # Robert Israel, Nov 22 2016
-
Mathematica
Select[8Range[200] - 1, PrimeQ] (* Alonso del Arte, Nov 07 2016 *)
-
PARI
(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.
-
PARI
A007522_upto(N, start=1)=select(p->p%8==7, primes([start, N])) #A7522=A007522_upto(10^5) A007522(n)={while(#A7522
A007522_upto(N*3\2, N+1))); A7522[n]} \\ M. F. Hasler, May 22 2025
Formula
a(n) = 7 + A139487(n)*8, n >= 1. - Wolfdieter Lang, Feb 18 2015
Comments