cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A007519 Primes of form 8n+1, that is, primes congruent to 1 mod 8.

This page as a plain text file.
%I A007519 M5037 #125 Jul 25 2025 09:02:13
%S A007519 17,41,73,89,97,113,137,193,233,241,257,281,313,337,353,401,409,433,
%T A007519 449,457,521,569,577,593,601,617,641,673,761,769,809,857,881,929,937,
%U A007519 953,977,1009,1033,1049,1097,1129,1153,1193,1201,1217,1249,1289,1297,1321,1361
%N A007519 Primes of form 8n+1, that is, primes congruent to 1 mod 8.
%C A007519 Discriminant is 32, class is 2. Binary quadratic forms ax^2 + bxy + cy^2 have discriminant d = b^2 - 4ac and gcd(a, b, c) = 1.
%C A007519 Integers n (n > 9) of form 4k + 1 such that binomial(n-1, (n-1)/4) == 1 (mod n) - _Benoit Cloitre_, Feb 07 2004
%C A007519 Primes of the form x^2 + 8y^2. - _T. D. Noe_, May 07 2005
%C A007519 Also primes of the form x^2 + 16y^2. See A140633. - _T. D. Noe_, May 19 2008
%C A007519 Is this the same sequence as A141174?
%C A007519 Being a subset of A001132 and also a subset of A038873, this is also a subset of the primes of the form u^2 - 2v^2. - _Tito Piezas III_, Dec 28 2008
%C A007519 These primes p are only which possess the property: for every integer m from interval [0, p) with the Hamming distance D(m, p) = 2, there exists an integer h from (m, p) with D(m, h) = 2. - _Vladimir Shevelev_, Apr 18 2012
%C A007519 Primes p such that p XOR 6 = p + 6. - _Brad Clardy_, Jul 22 2012
%C A007519 Odd primes p such that -1 is a 4th power mod p. - _Eric M. Schmidt_, Mar 27 2014
%C A007519 There are infinitely many primes of this form. See Brubaker link. - _Alonso del Arte_, Jan 12 2017
%C A007519 These primes split in Z[sqrt(2)]. For example, 17 = (-1)(1 - 3*sqrt(2))(1 + 3*sqrt(2)). This is also true of primes of the form 8n - 1. - _Alonso del Arte_, Jan 26 2017
%D A007519 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.
%D A007519 Z. I. Borevich and I. R. Shafarevich, Number Theory.
%D A007519 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%D A007519 James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 261.
%H A007519 Ray Chandler, <a href="/A007519/b007519.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from T. D. Noe)
%H A007519 Milton Abramowitz and Irene A. Stegun, eds., <a href="http://www.convertit.com/Go/ConvertIt/Reference/AMS55.ASP">Handbook of Mathematical Functions</a>, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
%H A007519 Ben Brubaker, <a href="http://math.mit.edu/~brubaker/781hw5sol.pdf">18.781, Fall 2007 Problem Set 5: Solutions to Selected Problems</a>, MIT (2007).
%H A007519 Peter Luschny, <a href="https://oeis.org/wiki/User:Peter_Luschny/BinaryQuadraticForms#Implementation">Binary Quadratic Forms</a>
%H A007519 Jorma K. Merikoski, Pentti Haukkanen, and Timo Tossavainen, <a href="https://doi.org/10.7546/nntdm.2024.30.3.516-529">The congruence x^n = -a^n (mod m): Solvability and related OEIS sequences</a>, Notes. Num. Theor. Disc. Math. (2024) Vol. 30, No. 3, 516-529. See p. 521.
%H A007519 N. J. A. Sloane et al., <a href="https://oeis.org/wiki/Binary_Quadratic_Forms_and_OEIS">Binary Quadratic Forms and OEIS</a> (Index to related sequences, programs, references)
%H A007519 D. B. Zagier, <a href="https://doi.org/10.1007/978-3-642-61829-1">Zetafunktionen und quadratische Körper</a>, Springer, 1981.
%e A007519 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
%t A007519 Select[1 + 8 Range@ 170, PrimeQ] (* _Robert G. Wilson v_ *)
%o A007519 (PARI) forprime(p=2,1e4,if(p%8==1,print1(p", "))) \\ _Charles R Greathouse IV_, Jun 16 2011
%o A007519 (PARI) forprimestep(p=17,10^4,8, print1(p", ")) \\ _Charles R Greathouse IV_, Jul 17 2024
%o A007519 (PARI) 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
%o A007519 (PARI)
%o A007519 A007519_upto(N, start=1)=select(t->t%8==1,primes([start,N]))
%o A007519 #A7519=A007519_upto(10^5)
%o A007519 A007519(n)={while(#A7519<n, my(N=A7519[#A7519]); A7519=concat(A7519, A007519_upto(N*3\2, N+1))); A7519[n]} \\ _M. F. Hasler_, May 22 2025
%o A007519 (Haskell)
%o A007519 a007519 n = a007519_list !! (n-1)
%o A007519 a007519_list = filter ((== 1) . a010051) [1,9..]
%o A007519 -- _Reinhard Zumkeller_, Mar 06 2012
%o A007519 (Magma) [p: p in PrimesUpTo(2000) | p mod 8 eq 1 ]; // _Vincenzo Librandi_, Aug 21 2012
%o A007519 (SageMath) # uses[binaryQF]
%o A007519 # The function binaryQF is defined in the link 'Binary Quadratic Forms'.
%o A007519 Q = binaryQF([1, 4, -4])
%o A007519 print(Q.represented_positives(1361, 'prime'))  # _Peter Luschny_, Jan 26 2017
%Y A007519 Subsequence of A017077 and of A038873.
%Y A007519 Cf. A139643. Complement in primes of A154264. Cf. A042987.
%Y A007519 Cf. A065091, A002144, A094407, A133870, A142925, A208177, A208178, A076339.
%Y A007519 Cf. A038872 (d = 5). A038873 (d = 8). A068228, A141123 (d = 12). A038883 (d = 13). A038889 (d = 17). A141111, A141112 (d = 65).
%Y A007519 Cf. also A242663.
%Y A007519 For a list of sequences giving numbers and/or primes represented by binary quadratic forms, see the "Binary Quadratic Forms and OEIS" link.
%K A007519 nonn,easy
%O A007519 1,1
%A A007519 _N. J. A. Sloane_, _Robert G. Wilson v_