login
A378491
Numbers k such that (in base 10) the k-th composite is a substring of the k-th prime.
0
5738, 20393, 20397, 20532, 28566, 305037, 511920, 151810713, 27746745416, 60097588222
OFFSET
1,1
COMMENTS
Numbers k such that A002808(k) is a substring of A000040(k).
FORMULA
floor((A000040(k) mod 10^i)/10^j) = A002808(k) for some i and j.
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