Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #32 Jun 12 2014 13:25:41
%S 3,7,19,79,103,109,277,379,487,967,1489,1663,1867,2857,3019,3253,3613,
%T 3697,4003,4783,4969,5413,5437,5503,5569,5647,5923,7477,7669,7687,
%U 7699,7789,7933,8233,8779,9007,9319,9547,9739,10597,11257,11467,11593,11827,12037
%N Primes p for which p + 4 and p^3 + 4 are primes.
%C This is a subsequence of:
%C A023200: Primes p such that p + 4 is also prime.
%C A073573: Numbers n such that n^3 + 4 is prime.
%H Abhiram R Devesh, <a href="/A243583/b243583.txt">Table of n, a(n) for n = 1..1000</a>
%e p = 3 is in this sequence because p + 4 = 7 (prime) and p^3 + 4 = 31 (prime).
%e p = 7 is in this sequence because p + 4 = 11 (prime) and p^3 + 4 = 347 (prime).
%o (Python)
%o import sympy.ntheory as snt
%o n=2
%o while n>1:
%o ....n1=n+4
%o ....n2=((n**3)+4)
%o ....##Check if n1 and n2 are also primes.
%o ....if snt.isprime(n1)== True and snt.isprime(n2)== True:
%o ........print(n, " , " , n1, " , ", n2)
%o ....n=snt.nextprime(n)
%o (PARI) s=[]; forprime(p=2, 20000, if(isprime(p+4) && isprime(p^3+4), s=concat(s, p))); s \\ _Colin Barker_, Jun 11 2014
%Y Cf. A023200, A073573.
%K nonn,easy
%O 1,1
%A _Abhiram R Devesh_, Jun 09 2014