|
|
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
|
|
|
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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|