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.
%I A371896 #46 Jun 02 2024 14:40:20 %S A371896 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, %T A371896 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, %U A371896 3,3,2,2,2,2,2,3,5,2,2,2,2,2,2,2,2,3,2 %N 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). %C A371896 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. %D A371896 L. Euler, Nouveaux Mémoires de l'Académie royale des Sciences, 1772, p. 36. %H A371896 Peter Rowlett, <a href="/A371896/b371896.txt">Table of n, a(n) for n = 1..10000</a> %e A371896 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). %t A371896 A001359[1] = 3; %t A371896 A001359[n_] := A001359[n] = (p = NextPrime[A001359[n - 1]]; %t A371896 While[!PrimeQ[p + 2], p = NextPrime[p]]; p) %t A371896 A371896[n_] := With[{p = A001359@n}, k = 1; %t A371896 While[PrimeQ[k^2 + k + p], k++]; k] %t A371896 (* _Leo C. Stein_, May 09 2024 *) %o A371896 (C++) %o A371896 #include <iostream> %o A371896 using namespace std; %o A371896 bool isPrime(int number){ %o A371896 if(number < 2) return false; %o A371896 if(number == 2) return true; %o A371896 if(number % 2 == 0) return false; %o A371896 for(int i=3; (i*i)<=number; i+=2){ %o A371896 if(number % i == 0) return false; %o A371896 } %o A371896 return true; %o A371896 } %o A371896 int main() { %o A371896 int x; %o A371896 for (int p=2; p<100000000; p++) { %o A371896 if (isPrime(p)) { %o A371896 x=1; %o A371896 while (isPrime(x*x+x+p)) { %o A371896 x++; %o A371896 } %o A371896 if (x>1) { %o A371896 cout << x << ", "; %o A371896 } %o A371896 } %o A371896 } %o A371896 return 0; %o A371896 } %Y A371896 Cf. A001359, A202018, A208936. %K A371896 nonn %O A371896 1,1 %A A371896 _Peter Rowlett_, Apr 11 2024