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.

A153645 Primes p such that p^2 + 4 and p^2 + 4p + 2 are also prime.

This page as a plain text file.
%I A153645 #14 Sep 08 2022 08:45:40
%S A153645 3,5,7,13,17,47,67,73,137,167,277,307,313,487,503,593,607,613,787,823,
%T A153645 1117,1123,1237,1523,1543,1637,1987,2777,2887,3037,3163,3433,3457,
%U A153645 3463,3797,3853,4093,4283,4583,5113,5297,5323,5683,5953,6047,6577,6803,6823
%N A153645 Primes p such that p^2 + 4 and p^2 + 4p + 2 are also prime.
%C A153645 Subsequence of A062324.
%H A153645 Vincenzo Librandi, <a href="/A153645/b153645.txt">Table of n, a(n) for n = 1..1000</a>
%e A153645 For prime p = 3, p^2+4 = 13 and p^2+4p+2 = 23 are prime; for p = 67, p^2+4 = 4493 and p^2+4p+2 = 4759 are prime.
%p A153645 a := proc (n) if isprime(n) = true and isprime(n^2+4) = true and isprime(n^2+4*n+2) = true then n else end if end proc: seq(a(n), n = 1 .. 7000); # _Emeric Deutsch_, Jan 02 2009
%t A153645 Select[Prime[Range[10000]],PrimeQ[#^2+4]&&PrimeQ[#^2 +4#+2]&] (* _Vincenzo Librandi_, Jul 27 2012 *)
%o A153645 (Magma) [ p: p in PrimesUpTo(7000) | IsPrime(p^2+4) and IsPrime(p^2+4*p+2) ];
%Y A153645 Cf. A062324 (p and p^2+4 are both prime).
%K A153645 nonn,easy
%O A153645 1,1
%A A153645 _Vincenzo Librandi_, Dec 30 2008
%E A153645 Edited, corrected (three terms deleted) and extended beyond a(10) by _Klaus Brockhaus_, Jan 02 2009
%E A153645 Corrected and extended by _Emeric Deutsch_, Jan 02 2009