login
First near twin primes of order 6n: smallest p such that p, p+2, p+6n and p+6n+2 are primes.
1

%I #14 Oct 05 2024 04:33:34

%S 5,5,11,5,11,5,17,11,5,11,5,29,29,17,11,5,5,29,197,17,11,5,11,5,29,41,

%T 17,11,5,11,5,5,29,107,17,11,5,11,5,29,101,17,11,5,11,5,29,59,17,11,5,

%U 107,29,107,17,11,5,71,107,59,461,59,41,137,29,431,17,11,5,11,5,29,179

%N First near twin primes of order 6n: smallest p such that p, p+2, p+6n and p+6n+2 are primes.

%H Amiram Eldar, <a href="/A079305/b079305.txt">Table of n, a(n) for n = 1..10000</a>

%t a[n_] := For[p=5, True, p+=6, If[PrimeQ[p]&&PrimeQ[p+2]&&PrimeQ[p+6n]&&PrimeQ[p+6n+2], Return[p]]]

%o (PARI) neartp(n) = { forstep(d=6,n,6, forprime(x=3,n, if(isprime(x+2) & isprime(x+d) & isprime(x+d+2), print1(x","); break ) ) ) }

%K easy,nonn

%O 1,1

%A _Cino Hilliard_, Feb 09 2003

%E Edited by _Dean Hickerson_, Feb 11 2003