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.

A238242 Primes p such that p^2+p+41 is also prime.

This page as a plain text file.
%I A238242 #22 Sep 08 2022 08:46:07
%S A238242 2,3,5,7,11,13,17,19,23,29,31,37,43,47,53,59,61,67,71,73,79,83,97,101,
%T A238242 103,107,113,131,137,139,149,151,157,167,179,181,191,193,197,199,211,
%U A238242 223,227,229,233,241,257,263,269,277,281,293,307,311,313,317,337,353
%N A238242 Primes p such that p^2+p+41 is also prime.
%C A238242 n^2 + n + 41 is Euler’s prime generating polynomial.
%C A238242 The first 12 terms in the sequence are the first 12 consecutive primes.
%H A238242 K. D. Bajpai, <a href="/A238242/b238242.txt">Table of n, a(n) for n = 1..3372</a>
%e A238242 13 is in the sequence because 13 is prime and 13^2+13+41 = 223 is also prime.
%e A238242 113 is in the sequence because 113 is prime and 113^2+113+41 =  12923 is also prime.
%p A238242 with(numtheory):KD := proc() local a,b; a:=ithprime(n); b:=a^2+a+41;  if isprime(b) then RETURN (a);  fi; end: seq(KD(), n=1..500);
%t A238242 Select[Prime[Range[200]],PrimeQ[#^2+#+41]&]
%o A238242 (PARI) s=[]; forprime(p=2, 1000, if(isprime(p^2+p+41), s=concat(s, p))); s \\ _Colin Barker_, Feb 20 2014
%o A238242 (Magma) [p: p in PrimesUpTo(400)| IsPrime(p^2+p+41)]; // _Vincenzo Librandi_, Feb 22 2014
%Y A238242 Cf. A000040, A005846, A202018, A097823.
%K A238242 nonn
%O A238242 1,1
%A A238242 _K. D. Bajpai_, Feb 20 2014