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.

A208936 Prime production length of the polynomial P = x^2 + x + prime(n): max { k>0 | P(x) is prime for all x=0,...,k-1 }.

This page as a plain text file.
%I A208936 #40 Mar 06 2025 15:27:23
%S A208936 1,2,4,1,10,1,16,1,1,2,1,1,40,1,1,1,2,1,1,2,1,1,1,1,1,4,1,3,1,1,1,1,2,
%T A208936 1,2,1,1,1,1,1,2,1,3,1,2,1,1,1,4,1,1,2,1,1,1,1,2,1,1,2,1,1,1,3,1,1,1,
%U A208936 1,5,1,1,1,1,1,1,1,1,1,1,1,2,1,2,1,1
%N A208936 Prime production length of the polynomial P = x^2 + x + prime(n): max { k>0 | P(x) is prime for all x=0,...,k-1 }.
%C A208936 a(n) > 0 by definition, and a(n) > 1 iff n is a twin prime; a(n) would be zero for composite n if "prime(n)" was replaced by n.
%C A208936 Euler's original "prime producing polynomial" was P = x^2 - x + 41; changing the sign increases the prime production length by 1.
%H A208936 Robert Israel, <a href="/A208936/b208936.txt">Table of n, a(n) for n = 1..10000</a>
%H A208936 Shaoji Xu, <a href="http://m-hikari.com/ija/ija-2012/ija-1-4-2012/xushaojiIJA1-4-2012.pdf">On Euler Polynomials and Rabinowitsch Polynomials</a>, International Journal of Algebra, Vol. 6, 2012, no. 3, 123 - 134.
%p A208936 A208936:= proc(n) local N,r;
%p A208936    N:= ithprime(n);
%p A208936    for r from 1 do
%p A208936      if not isprime(r^2+r+N) then return(r) end if
%p A208936    end do
%p A208936 end proc; # _Robert Israel_, Feb 11 2013
%o A208936 (PARI) a(n)={n=prime(n); for( x=1, 1e9, isprime(x^2+x+n) || return(x))}
%K A208936 nonn
%O A208936 1,2
%A A208936 _M. F. Hasler_, Mar 03 2012