OFFSET
1,2
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = 3*A014561(n) + 1. - Zak Seidov, Sep 21 2009
MAPLE
for n from 1 to 10000 do m := 10*n: if isprime(m+1) and isprime(m+3) and isprime(m+7) and isprime(m+9) then print(n); fi: od: quit
MATHEMATICA
Select[ Range[ 1, 10000, 3 ], PrimeQ[ 10*#+1 ] && PrimeQ[ 10*#+3 ] && PrimeQ[ 10*#+7 ] && PrimeQ[ 10*#+9 ]& ]
Select[Range[15000], And @@ PrimeQ /@ ({1, 3, 7, 9} + 10#) &] (* Ray Chandler, Jan 12 2007 *)
PROG
(Magma) [n: n in [0..10000] | forall{10*n+r: r in [1, 3, 7, 9] | IsPrime(10*n+r)}]; // Bruno Berselli, Sep 04 2012
(PARI) p=2; q=3; r=5; forprime(s=7, 1e5, if(s-p==8 && r-p==6 && q-p==2 && p%10==1, print1(p", ")); p=q; q=r; r=s) \\ Charles R Greathouse IV, Mar 21 2013
(Haskell)
a007811 n = a007811_list !! (n-1)
a007811_list = map (pred . head) $ filter (all (== 1) . map a010051') $
iterate (zipWith (+) [10, 10, 10, 10]) [1, 3, 7, 9]
-- Reinhard Zumkeller, Jul 18 2014
(Perl) use ntheory ":all"; my @s = map { ($_-1)/10 } sieve_prime_cluster(10, 1e9, 2, 6, 8); say for @s; # Dana Jacobsen, May 04 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane and J. H. Conway, Mar 15 1996
STATUS
approved