A378491 Numbers k such that (in base 10) the k-th composite is a substring of the k-th prime.
5738, 20393, 20397, 20532, 28566, 305037, 511920, 151810713, 27746745416, 60097588222
Offset: 1
Examples
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.
Programs
-
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;
Extensions
a(9) from Michael S. Branicky, Dec 06 2024
a(10) from Michael S. Branicky, Dec 09 2024
Comments