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!)
A032352 Numbers k such that there is no prime between 10*k and 10*k+9. 35

%I #47 Sep 08 2022 08:44:51

%S 20,32,51,53,62,84,89,107,113,114,126,133,134,135,141,146,150,164,167,

%T 168,171,176,179,185,189,192,196,204,207,210,218,219,232,236,240,248,

%U 249,251,256,258,282,294,298,305,309,314,315,317,323,324,326,328,342

%N Numbers k such that there is no prime between 10*k and 10*k+9.

%C Numbers k with property that appending any single decimal digit to k does not produce a prime.

%C A007920(n*10) > 10.

%H M. I. Wilczynski, <a href="/A032352/b032352.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) ~ n. - _Charles R Greathouse IV_, Mar 29 2013

%e m=32: 321=3*107, 323=17*19, 325=5*5*13, 327=3*109, 329=7*47, therefore 32 is a term.

%p a:=proc(n) if map(isprime,{seq(10*n+j,j=1..9)})={false} then n else fi end: seq(a(n),n=1..350); # _Emeric Deutsch_, Aug 01 2005

%t f[n_] := PrimePi[10n + 10] - PrimePi[10n]; Select[ Range[342], f[ # ] == 0 &] (* _Robert G. Wilson v_, Sep 24 2004 *)

%t Select[Range[342], NextPrime[10 # ] > 10 # + 9 &] (* _Maciej Ireneusz Wilczynski_, Jul 18 2010 *)

%o (Haskell)

%o a032352 n = a032352_list !! (n-1)

%o a032352_list = filter

%o (\x -> all (== 0) $ map (a010051 . (10*x +)) [1..9]) [1..]

%o -- _Reinhard Zumkeller_, Oct 22 2011

%o (Magma) [n: n in [1..350] | IsZero(#PrimesInInterval(10*n, 10*n+9))]; // _Bruno Berselli_, Sep 04 2012

%o (PARI) is(n)=!isprime(10*n+1) && !isprime(10*n+3) && !isprime(10*n+7) && !isprime(10*n+9) \\ _Charles R Greathouse IV_, Mar 29 2013

%o (Python)

%o from sympy import isprime

%o def aupto(limit):

%o alst = []

%o for d in range(2, limit+1):

%o td = [10*d + j for j in [1, 3, 7, 9]]

%o if not any(isprime(t) for t in td): alst.append(d)

%o return alst

%o print(aupto(342)) # _Michael S. Branicky_, May 30 2021

%Y Cf. A124665 (subsequence), A010051, A007811, A216292, A216293.

%K nonn,base,easy

%O 1,1

%A _Jeff Burch_

%E More terms from _Miklos Kristof_, Aug 27 2002

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 16 08:27 EDT 2024. Contains 371698 sequences. (Running on oeis4.)