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.

A164385 Composite numbers n such that n+4 and n-4 are both prime.

This page as a plain text file.
%I A164385 #25 Mar 23 2025 15:36:38
%S A164385 9,15,27,33,57,63,75,93,105,135,153,177,195,237,267,273,363,393,405,
%T A164385 435,453,483,495,567,573,597,603,657,687,705,723,747,765,825,915,933,
%U A164385 987,1017,1035,1065,1113,1167,1197,1227,1233,1287,1293,1323,1377,1443,1455,1485
%N A164385 Composite numbers n such that n+4 and n-4 are both prime.
%C A164385 Composite numbers of the form A023202(k)+4, any k.
%C A164385 A087680 without the {7} [Proof: there are no 3 primes in arithmetic progression p, p+4, p+8, except p=3].
%C A164385 A164383 INTERSECT A164384; A087680 INTERSECT A002808.
%C A164385 If p=3*l+1, p+8 were divisible by 3, and if p=3*l+2, p+4 were divisible by 3. - _R. J. Mathar_, Aug 20 2009
%C A164385 All terms are divisible by 3. - _Zak Seidov_, Apr 22 2015
%F A164385 a(n) = A023202(n+1)+4 = A087680(n+1). - _Zak Seidov_, Apr 22 2015
%e A164385 a(1) = 5(prime)+4 = 13(prime)-4 = 9 (composite).
%e A164385 a(2) = 11(prime)+4 = 19(prime)-4 = 15 (composite).
%t A164385 Select[Range[8, 2000], PrimeQ[#+4] && PrimeQ[#-4] &] (* _Vincenzo Librandi_, Apr 22 2015 *)
%t A164385 Select[Range[9,5000],AllTrue[#+{4,-4},PrimeQ]&] (* _Harvey P. Dale_, Mar 23 2025 *)
%o A164385 (Magma) [n: n in [8..2000] | IsPrime(n+4) and IsPrime(n-4)]; // _Vincenzo Librandi_, Apr 22 2015
%Y A164385 Cf. A002808, A023202, A087680.
%K A164385 nonn
%O A164385 1,1
%A A164385 _Juri-Stepan Gerasimov_, Aug 14 2009
%E A164385 65 removed, 337 changed to 237 etc. by _R. J. Mathar_, Aug 20 2009