This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A246398 Smallest number of digits that have to be inserted into or prepended to decimal representation of n, to get a prime. 1
 2, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 2, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 2, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 2, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 2, 1 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,1 COMMENTS a(n) = 0 iff n is a prime number, a(A000040(n)) = 0; a(n) = A055642(A062584(n)) - A055642(n). LINKS Reinhard Zumkeller, Table of n, a(n) for n = 0..10000 PROG (Haskell) a246398 n = a246398_list !! n a246398_list = f 0 \$ map show a000040_list where    f x pss = (length ps - length xs) :              f (x + 1) (dropWhile (== xs) pss)      where ps = head [qs | qs <- pss, isin xs qs]; xs = show x    isin [] _  = True    isin _  [] = False    isin (u:us) vs = not (null ws) && isin us ws                     where ws = dropWhile (/= u) vs CROSSREFS Cf. A000040, A055642, A062584, A068164. Sequence in context: A298426 A130068 A316825 * A051699 A007920 A127587 Adjacent sequences:  A246395 A246396 A246397 * A246399 A246400 A246401 KEYWORD nonn,base AUTHOR Reinhard Zumkeller, Nov 13 2014 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 22 02:44 EDT 2019. Contains 326169 sequences. (Running on oeis4.)