OFFSET
1,1
COMMENTS
Numbers k with property that appending any single decimal digit to k does not produce a prime.
A007920(n*10) > 10.
LINKS
M. I. Wilczynski, Table of n, a(n) for n = 1..10000
FORMULA
a(n) ~ n. - Charles R Greathouse IV, Mar 29 2013
EXAMPLE
m=32: 321=3*107, 323=17*19, 325=5*5*13, 327=3*109, 329=7*47, therefore 32 is a term.
MAPLE
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
MATHEMATICA
f[n_] := PrimePi[10n + 10] - PrimePi[10n]; Select[ Range[342], f[ # ] == 0 &] (* Robert G. Wilson v, Sep 24 2004 *)
Select[Range[342], NextPrime[10 # ] > 10 # + 9 &] (* Maciej Ireneusz Wilczynski, Jul 18 2010 *)
Flatten@Position[10*#+{1, 3, 7, 9}&/@Range@4000, {_?CompositeQ ..}] (* Hans Rudolf Widmer, Jul 06 2024 *)
PROG
(Haskell)
a032352 n = a032352_list !! (n-1)
a032352_list = filter
(\x -> all (== 0) $ map (a010051 . (10*x +)) [1..9]) [1..]
-- Reinhard Zumkeller, Oct 22 2011
(Magma) [n: n in [1..350] | IsZero(#PrimesInInterval(10*n, 10*n+9))]; // Bruno Berselli, Sep 04 2012
(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
(Python)
from sympy import isprime
def aupto(limit):
alst = []
for d in range(2, limit+1):
td = [10*d + j for j in [1, 3, 7, 9]]
if not any(isprime(t) for t in td): alst.append(d)
return alst
print(aupto(342)) # Michael S. Branicky, May 30 2021
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
EXTENSIONS
More terms from Miklos Kristof, Aug 27 2002
STATUS
approved