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.

Showing 1-2 of 2 results.

A208645 Least x>0 such that x^2+x+n is not prime.

Original entry on oeis.org

2, 4, 1, 2, 1, 4, 1, 1, 1, 2, 1, 10, 1, 1, 1, 2, 1, 16, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 4, 1, 1, 1, 2, 1, 40, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 6, 1, 1, 1, 2, 1, 1, 1, 1
Offset: 0

Views

Author

M. F. Hasler, Mar 03 2012

Keywords

Comments

By definition, a(n)>0 for all n, and a(n)>1 if n+2 is prime.

Examples

			a(0)=2 since 1^2+1+0=2 is prime, but 2^2+2+0=6 is composite.
a(1)=4 since 1^2+1+1=2, 2^2+2+1=7 and 3^2+3+1=13 are prime, but 4^2+4+1=21 is composite.
		

Crossrefs

Programs

  • Mathematica
    lx[n_]:=Module[{x=1},While[PrimeQ[x^2+x+n],x++];x]; Array[lx, 90, 0] (* Harvey P. Dale, Aug 14 2013 *)
  • PARI
    a(n)=for( x=1, n+3, isprime(x^2+x+n) || return(x))

A371896 a(n) is the length of the uninterrupted sequence of primes generated by the polynomial f(x) = x^2 + x + p for x=0,1,..., where p=A001359(n).

Original entry on oeis.org

2, 4, 10, 16, 2, 40, 2, 2, 4, 3, 2, 2, 2, 3, 2, 4, 2, 2, 2, 3, 5, 2, 2, 3, 2, 2, 2, 2, 5, 2, 2, 3, 2, 3, 3, 2, 2, 2, 2, 4, 2, 2, 7, 2, 3, 2, 5, 2, 4, 4, 6, 2, 2, 2, 2, 2, 3, 2, 2, 2, 3, 2, 3, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 2, 3, 5, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2
Offset: 1

Views

Author

Peter Rowlett, Apr 11 2024

Keywords

Comments

p=A001359(n) is the smaller prime of a twin prime pair so that f(0) = p and f(1) = p+2 are both primes so a(n) >= 2 and this sequence is the terms >= 2 in A208936.

Examples

			For n=6, p = A001359(n) = 41 and f(x) = x^2 + x + 41 is Euler's polynomial which generates primes f(x) for x=0,1,2,...,39, which is 40 terms so a(6) = 40 (cf. A202018).
		

References

  • L. Euler, Nouveaux Mémoires de l'Académie royale des Sciences, 1772, p. 36.

Crossrefs

Programs

Showing 1-2 of 2 results.