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.

A238593 Smallest m such that the n-th prime occurs as substring in A019518(n).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 2, 10, 7, 12, 13, 14, 15, 16, 17, 18, 19, 5, 21, 22, 23, 24, 25, 26, 27, 28, 29, 6, 31, 7, 12, 34, 35, 36, 37, 38, 19, 21, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 32, 59, 60, 61, 11, 63, 33, 12, 7, 66, 68
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 03 2014

Keywords

Comments

a(n) <= n; see A165450 for earley bird primes: A165450(n) = A000040(m) with a(m) < m.

Examples

			n=10, prime(10)=29 occurs first in A019518(10)=2357111317192329, therefore a(10) = 10;
prime(11)=31 occurs already in A019518(7)=2357111317, therefore a(11) = 7.
		

Programs

  • Haskell
    import Data.List (isInfixOf, findIndex); import Data.Maybe (fromJust)
    a238593 n = (+ 1) $ fromJust $ findIndex
       (isInfixOf $ show $ a000040 n) (scanl1 (++) $ map show a000040_list)