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!)
A247152 Least composite which contains prime(n) as a substring. 1
12, 30, 15, 27, 110, 130, 117, 119, 123, 129, 231, 237, 141, 143, 147, 153, 159, 161, 267, 171, 273, 279, 183, 189, 297, 1010, 1030, 1070, 1090, 1113, 1127, 1131, 1137, 1139, 1149, 1510, 1157, 1630, 1167, 1173, 1179, 1810, 1191, 1930, 1197, 1199, 1211, 2223, 1227, 2229 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
a(n) is the smallest among (1.p ; 2.p ; p.0) where p=prime(n) and . denotes concatenation: one among 1.p and 2.p is divisible by 3, but of course p.0 = 10p is also composite and may be smaller than the other two. None of the three can occur earlier because any of the three yields the n-th prime when the first digit (or the last, in case it is zero) is removed: This yields a bijection from the range of this sequence to the set of primes.
LINKS
E. Angelini, Hide my prime (in a composite), Nov 21 2014
PROG
(PARI) a(n)=forstep(t=n=prime(n), 10*n, 10^#Str(n), !isprime(t)&&return(t)); 10*n
(Python)
from sympy import isprime, prime
def a(n):
k, target = 4, str(prime(n))
while not target in str(k) or isprime(k): k += 1
return k
print([a(n) for n in range(1, 51)]) # Michael S. Branicky, Dec 30 2021
CROSSREFS
Sequence in context: A178494 A049725 A183723 * A299041 A334989 A331367
KEYWORD
nonn,base,easy
AUTHOR
Eric Angelini and M. F. Hasler, Nov 21 2014
STATUS
approved

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 23 20:33 EDT 2024. Contains 371916 sequences. (Running on oeis4.)