[go: up one dir, main page]

login
A007811
Numbers k for which 10k+1, 10k+3, 10k+7 and 10k+9 are primes.
51
1, 10, 19, 82, 148, 187, 208, 325, 346, 565, 943, 1300, 1564, 1573, 1606, 1804, 1891, 1942, 2101, 2227, 2530, 3172, 3484, 4378, 5134, 5533, 6298, 6721, 6949, 7222, 7726, 7969, 8104, 8272, 8881, 9784, 9913, 10111, 10984, 11653, 11929, 12220, 13546, 14416, 15727
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
KEYWORD
nonn
AUTHOR
N. J. A. Sloane and J. H. Conway, Mar 15 1996
STATUS
approved