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.

A007635 Primes of form n^2 + n + 17.

This page as a plain text file.
%I A007635 M5069 #68 Jul 16 2025 10:04:53
%S A007635 17,19,23,29,37,47,59,73,89,107,127,149,173,199,227,257,359,397,479,
%T A007635 523,569,617,719,773,829,887,947,1009,1277,1423,1499,1657,1823,1997,
%U A007635 2087,2179,2273,2467,2879,3209,3323,3557,3677,3923,4049,4177,4987,5273
%N A007635 Primes of form n^2 + n + 17.
%C A007635 a(n) = A117530(7,n) for n <= 7: a(1) = A117530(7,1) = A014556(5) = 17, A117531(7) = 7. - _Reinhard Zumkeller_, Mar 26 2006
%C A007635 Note that the gaps between terms increases by 2*k from k = 1 to 15: 19 - 17 = 2, 23 - 19 = 4, 29 - 23 = 6 and so on until 257 - 227 = 30 then fails at 289 - 257 = 32 since 289 = 17^2. - _J. M. Bergot_, Mar 18 2017
%C A007635 From _Peter Bala_, Apr 15 2018: (Start)
%C A007635 The polynomial P(n):= n^2 + n + 17 takes distinct prime values for the 16 consecutive integers n = 0 to 15. It follows that the polynomial P(n - 16) takes prime values for the 32 consecutive integers n = 0 to 31, consisting of the 16 primes above each taken twice. We note two consequences of this fact.
%C A007635 1) The polynomial P(2*n - 16) = 4*n^2 - 62*n + 257 also takes prime values for the 16 consecutive integers n = 0 to 15.
%C A007635 2)The polynomial P(3*n - 16) = 9*n^2 - 93*n + 257 takes prime values for the 11 consecutive integers n = 0 to 10 ( = floor(31/3)). In addition, calculation shows that P(3*n-16) also takes prime values for n from -5 to -1. Equivalently put, the polynomial P(3*n-31) = 9*n^2 - 183*n + 947 takes prime values for the 16 consecutive integers n = 0 to 15. Cf. A005846 and A048059. (End)
%C A007635 The primes in this sequence are not primes in the ring of integers of Q(sqrt(-67)). If p = n^2 + n + 17, then ((2n + 1)/2 - sqrt(-67)/2)((2n + 1)/2 + sqrt(-67)/2) = p. For example, 3^2 + 3 + 17 = 29 and (7/2 - sqrt(-67)/2)(7/2 + sqrt(-67)/2) = 29 also. - _Alonso del Arte_, Nov 27 2019
%D A007635 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%D A007635 James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 115.
%D A007635 David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, 96.
%H A007635 Seiichi Manyama, <a href="/A007635/b007635.txt">Table of n, a(n) for n = 1..10000</a>
%H A007635 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Prime-GeneratingPolynomial.html">Prime-generating Polynomial.</a>
%F A007635 a(n) = A028823(n)^2 + A028823(n) + 17. - _Seiichi Manyama_, Mar 19 2017
%t A007635 Select[Table[n^2 + n + 17, {n, 0, 99}], PrimeQ] (* _Alonso del Arte_, Nov 27 2019 *)
%o A007635 (Magma) [a: n in [0..250]|IsPrime(a) where a is n^2+n+17]; // _Vincenzo Librandi_, Dec 23 2010
%o A007635 (PARI) select(isprime, vector(100,n,n^2+n+17)) \\ _Charles R Greathouse IV_, Jul 12 2016
%o A007635 (Python)
%o A007635 from sympy import isprime
%o A007635 it = (n**2 + n + 17 for n in range(250))
%o A007635 print([p for p in it if isprime(p)]) # _Indranil Ghosh_, Mar 18 2017
%Y A007635 Cf. A005846, A028823, A048059, A160548.
%K A007635 nonn,easy
%O A007635 1,1
%A A007635 _N. J. A. Sloane_, _Mira Bernstein_, _Robert G. Wilson v_