%I #22 Jan 10 2020 05:25:00
%S 1,3,45,2055,39033,48585,101535,104553,112383,117723,129315,152553,
%T 170793,178095,234483,246435,258093,272403,304845,306885,365343,
%U 372663,375813,405393,405975,436425,456903,494193,538965,551475,559713,569805,570033,767895,792903
%N Numbers k such that {k^2 + 2, k^2 + 4} and {k^3 + 2, k^3 + 4} are twin prime pairs.
%C Except a(1), all terms are multiples of 3.
%C a(n) == {3 or 15} (mod 30) for n>2.
%H Amiram Eldar, <a href="/A283698/b283698.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..3665 from K. D. Bajpai)
%e a(2) = 3, {3^2 + 2 = 11, 3^2 + 4 = 13 } and {3^3 + 2 = 29, 3^3 + 4 = 31} are twin prime pairs.
%e a(3) = 45, {45^2 + 2 = 2027, 45^2 + 4 = 2029 } and {45^3 + 2 = 91127, 45^3 + 4 = 91129} are twin prime pairs.
%t Select[Range[1000000], PrimeQ[#^2 + 2] && PrimeQ[#^2 + 4] && PrimeQ[#^3 + 2] && PrimeQ[#^3 + 4] &]
%o (PARI) for(n=1, 100000, if(isprime(n^2+2) && isprime(n^2+4) && isprime(n^3+2) && isprime(n^3+4), print1(n, ", ")))
%Y Intersection of A086381 and A178337.
%Y Cf. A000040, A144953, A173255, A178336.
%K nonn
%O 1,2
%A _K. D. Bajpai_, Mar 14 2017