OFFSET
1,1
EXAMPLE
a(1) = 5738 is a term because the 5738th composite, 6591, is a substring of the 5738th prime, 56591.
a(2) = 20393 is a term because the 20393th composite, 22954, is a substring of the 20393th prime, 229547.
MAPLE
g:= proc(p, c) StringTools:-Search(sprintf("%d", c), sprintf("%d", p)) <> 0 end proc:
nextcomp:= proc(c) if isprime(c+1) then c+2 else c+1 fi end proc:
p:= 1: c:= 2: Res:= NULL:
for n from 1 to 10^6 do
p:= nextprime(p); c:= nextcomp(c);
if g(p, c) then Res:= Res, n; fi
od:
Res;
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Robert Israel, Nov 28 2024
EXTENSIONS
a(9) from Michael S. Branicky, Dec 06 2024
a(10) from Michael S. Branicky, Dec 09 2024
STATUS
approved
