login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A007811 Numbers k for which 10k+1, 10k+3, 10k+7 and 10k+9 are primes. 51

%I #61 Feb 05 2024 00:59:24

%S 1,10,19,82,148,187,208,325,346,565,943,1300,1564,1573,1606,1804,1891,

%T 1942,2101,2227,2530,3172,3484,4378,5134,5533,6298,6721,6949,7222,

%U 7726,7969,8104,8272,8881,9784,9913

%N Numbers k for which 10k+1, 10k+3, 10k+7 and 10k+9 are primes.

%H Charles R Greathouse IV, <a href="/A007811/b007811.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = 3*A014561(n) + 1. - _Zak Seidov_, Sep 21 2009

%p 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

%t Select[ Range[ 1, 10000, 3 ], PrimeQ[ 10*#+1 ] && PrimeQ[ 10*#+3 ] && PrimeQ[ 10*#+7 ] && PrimeQ[ 10*#+9 ]& ]

%t Select[Range[15000], And @@ PrimeQ /@ ({1, 3, 7, 9} + 10#) &] (* _Ray Chandler_, Jan 12 2007 *)

%o (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

%o (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

%o (Haskell)

%o a007811 n = a007811_list !! (n-1)

%o a007811_list = map (pred . head) $ filter (all (== 1) . map a010051') $

%o iterate (zipWith (+) [10, 10, 10, 10]) [1, 3, 7, 9]

%o -- _Reinhard Zumkeller_, Jul 18 2014

%o (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

%Y Cf. A024912, A102338, A102342, A102700, A007530, A014561, A008471, A032352, A216292, A216293, A125855.

%Y Cf. A010051, A245304, A245305.

%K nonn

%O 1,2

%A _N. J. A. Sloane_ and _J. H. Conway_, Mar 15 1996

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)