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.

A284014 Numbers k such that {k + 2, k + 4} and {k^2 + 2, k^2 + 4} are both twin prime pairs.

This page as a plain text file.
%I A284014 #30 Jan 06 2025 21:06:27
%S A284014 1,3,15,57,147,2085,6687,6957,11055,15267,17385,17577,20505,20637,
%T A284014 23667,26247,31077,31317,32115,32967,34497,39225,47775,52065,53715,
%U A284014 55335,56205,58365,62187,63585,66567,67215,70875,77235,77475,82005,85827,89595,89817,107505
%N A284014 Numbers k such that {k + 2, k + 4} and {k^2 + 2, k^2 + 4} are both twin prime pairs.
%C A284014 After a(1), all the terms are multiples of 3.
%C A284014 After a(2), all the terms are congruent to 5 or 7 (mod 10).
%H A284014 Amiram Eldar, <a href="/A284014/b284014.txt">Table of n, a(n) for n = 1..10000</a>
%e A284014 a(2) = 3, {3 + 2 = 5, 3 + 4 = 7} and {3^2 + 2 = 11, 3^2 + 4 = 13} are twin prime pairs.
%e A284014 a(3) = 15, {15 + 2 = 17, 15 + 4 = 19} and {15^2 + 2 = 227, 15^2 + 4 = 229} are twin prime pairs.
%t A284014 Select[Range[1000000], PrimeQ[# + 2] && PrimeQ[# + 4] && PrimeQ[#^2 + 2] && PrimeQ[#^2 + 4] &]
%o A284014 (PARI) for(n=1, 100000,2; if(isprime(n+2) && isprime(n+4) && isprime(n^2+2) &&isprime(n^2+4), print1(n, ", ")))
%o A284014 (Magma) [n: n in [0..100000] | IsPrime(n+2) and IsPrime(n+4) and IsPrime(n^2+2) and IsPrime(n^2+4)];
%o A284014 (Scheme)
%o A284014 ;; With Antti Karttunen's IntSeq-library.
%o A284014 (define A284014 (MATCHING-POS 1 1 (lambda (n) (and (= 1 (A010051 (+ n 2))) (= 1 (A010051 (+ n 4))) (= 1 (A010051 (+ (* n n) 2))) (= 1 (A010051 (+ (* n n) 4)))))))
%o A284014 ;; _Antti Karttunen_, Apr 15 2017
%Y A284014 Appears to be the intersection of A086381 and A256388, but that may be unproven.
%Y A284014 Cf. A000040, A001359, A007591, A010051, A067201, A178336, A178337.
%K A284014 nonn
%O A284014 1,2
%A A284014 _K. D. Bajpai_, Mar 18 2017