login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Numbers k such that 6*k - 1, 6*k + 1, 6*k + 29, and 6*k + 31 are primes.
1

%I #13 Sep 08 2022 08:45:50

%S 2,5,7,12,18,25,33,40,47,72,95,138,170,172,177,215,242,278,333,347,

%T 352,373,385,443,495,550,555,560,588,637,670,688,705,707,753,975,1045,

%U 1110,1127,1243,1260,1433,1495,1502,1572,1668,1673,1712,1717,1738,1750,1810

%N Numbers k such that 6*k - 1, 6*k + 1, 6*k + 29, and 6*k + 31 are primes.

%C Numbers n such that n and n+5 are both in A002822.

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

%e A002822 starts 1,2,3,5,7,10,12,17,18,23,... Hence the first terms are 2 (7 is in A002822), 5 (10 is in A002822), 7 (12 is in A002822), 12 (17 is in A002822), 18 (23 is in A002822).

%p # From _R. J. Mathar_, Mar 01 2010: (Start)

%p isA002822 := proc(n)

%p if isprime(6*n-1) and isprime(6*n+1) then

%p true;

%p else

%p false;

%p end if;

%p end proc:

%p isA173088 := proc(n)

%p isA002822(n) and isA002822(n+5) ;

%p end proc:

%p for n from 1 to 1700 do

%p if isA173088(n) then

%p printf("%d,",n) ;

%p end if;

%p end do ; # (End)

%t Select[Range[2000], And @@ PrimeQ[6*# + {-1, 1, 29, 31}] &] (* _Amiram Eldar_, Jan 01 2020 *)

%o (Magma) A002822:=[ k: k in [1..3000] | IsPrime(6*k-1) and IsPrime(6*k+1) ]; [ p: p in A002822 | p+5 in A002822 ]; // _Klaus Brockhaus_, Mar 01 2010

%Y Cf. A002822 (numbers n such that 6*n-1, 6*n+1 are twin primes).

%K nonn

%O 1,1

%A _Juri-Stepan Gerasimov_, Feb 14 2010

%E Edited, corrected and extended by _Klaus Brockhaus_, _R. J. Mathar_ and _N. J. A. Sloane_, Mar 03 2010

%E Edited by _Charles R Greathouse IV_, Mar 24 2010