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”).
%I #20 Mar 17 2023 07:12:34
%S 61,6361,10771,11311,17791,19471,20011,24391,25951,30091,35251,41911,
%T 45631,47431,58711,67891,72271,74161,86341,89821,91711,93001,95311,
%U 103171,109321,124021,124171,132961,149491,153871,155731,156151,176461,179461,197551,213181,217681
%N Primes p = 1 mod 6 such that all three iterations p=(6p+1) give primes = 1 mod 6.
%C All terms are = 1 mod 30.
%C Note that 4th iteration gives composite integer = 5 mod 10.
%C (a(n)-1)/30 = 2, 212, 359, 377, 593, 649, 667, 813, 865,...
%H Zak Seidov, <a href="/A210686/b210686.txt">Table of n, a(n) for n = 1..1000</a>
%e a(1) = 61 because 6*61 + 1 = 367, 6*367 + 1 = 2203, and 6*2203 + 1 = 13219 are all primes = 1 mod 6.
%t p=31;Reap[Do[If[Union[PrimeQ[NestList[6#+1&,p,3]]]=={True},Sow[p]];p=p+30,{10^4}]][[2,1]]
%o (PARI) {p=31; for(i=1,10^4,p=p+30; if(isprime(p)&&isprime(q=6*p+1)&&isprime(r=6*q+1)&&isprime(6*r+1),print1(p",")))}
%o (PARI) forprime(p=2,1e6,if(p%30<2&&isprime(6*p+1)&&isprime(36*p+7)&&isprime(216*p+43),print1(p", "))) \\ _Charles R Greathouse IV_, Mar 29 2012
%o (Magma) [p: p in PrimesUpTo(22*10^4) | p mod 6 eq 1 and forall{q: i in [1..3] | IsPrime(q) where q is (6^i*(5*p+1)-1) div 5}]; // _Bruno Berselli_, Mar 29 2012
%Y Subsequence of A002476.
%K nonn
%O 1,1
%A _Zak Seidov_, Mar 28 2012