cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A378491 Numbers k such that (in base 10) the k-th composite is a substring of the k-th prime.

Original entry on oeis.org

5738, 20393, 20397, 20532, 28566, 305037, 511920, 151810713, 27746745416, 60097588222
Offset: 1

Views

Author

Robert Israel, Nov 28 2024

Keywords

Comments

Numbers k such that A002808(k) is a substring of A000040(k).

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.
		

Crossrefs

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;

Formula

floor((A000040(k) mod 10^i)/10^j) = A002808(k) for some i and j.

Extensions

a(9) from Michael S. Branicky, Dec 06 2024
a(10) from Michael S. Branicky, Dec 09 2024