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.

A356079 Primes p such that p+6, p-6, 2*p+3 and 2*p-3 are prime.

This page as a plain text file.
%I A356079 #11 Aug 03 2022 11:45:25
%S A356079 13,17,53,67,157,563,613,647,1187,1453,1663,4007,4133,5443,5743,6073,
%T A356079 6863,7823,8747,11833,12113,12583,12653,15467,21997,23747,25463,25673,
%U A356079 26183,41017,42683,59447,60337,65173,67427,68443,75527,80783,89527,94433,95917,100517,101203,104003,110603,111773
%N A356079 Primes p such that p+6, p-6, 2*p+3 and 2*p-3 are prime.
%C A356079 p, q, 2*p+q, 2*p-q, p+2*q and p-2*q are all prime if and only if q = 3 and p is in this sequence.
%H A356079 Robert Israel, <a href="/A356079/b356079.txt">Table of n, a(n) for n = 1..10000</a>
%e A356079 a(3) = 53 is a term because 53, 53+6 = 59, 53-6 = 47, 2*53 + 3 = 109 and 2*53 - 3 = 103 are all prime.
%p A356079 filter:= proc(p) andmap(isprime,[p,p+6,p-6,2*p+3,2*p-3]) end proc:
%p A356079 select(filter, [seq(i,i=3..200000,2)]);
%t A356079 Select[Prime[Range[10^4]], AllTrue[{# - 6, # + 6, 2*# - 3, 2*# + 3}, PrimeQ] &] (* _Amiram Eldar_, Jul 25 2022 *)
%o A356079 (Python)
%o A356079 from sympy import isprime
%o A356079 def ok(p): return all(isprime(k) for k in [p, p+6, p-6, 2*p+3, 2*p-3])
%o A356079 print([k for k in range(10**6) if ok(k)]) # _Michael S. Branicky_, Jul 25 2022
%K A356079 nonn
%O A356079 1,1
%A A356079 _J. M. Bergot_ and _Robert Israel_, Jul 25 2022