login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A135605 Consider the infinite string S = 12345678910111213141516171819202122232425262728293031... Sequence gives the first prime that starts at the k-th digit, skipping zero digits. 3
1234567891, 2, 3, 4567, 5, 67, 7, 89, 9101112131, 101, 11, 11, 1213, 2, 13, 3, 14151617, 41, 151, 5, 16171819202122232425262728293031323334353637383940414243, 61, 17, 7, 181, 81920212223242526272829303, 19, 920212223242526272829303132333435363738394041424344454647484950515253 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
a(67)>10^5000. - Robert G. Wilson v, Mar 01 2008
LINKS
Robert G. Wilson v, Table of n, a(n) for n=1..66
EXAMPLE
Examples from N. J. A. Sloane, Feb 24 2021: (Start)
S = 1234567891011121314151617181920212...
The 10th digit is a 1, and the first prime in S that starts with that digit is 101.
The 11th digit is 0, so we skip it.
The 12th digit is 1, and the first prime in S that starts with that digit is 11.
The 13th digit is another 1, and the first prime in S that starts with that digit is another 11.
The 14th digit is another 1, and the first prime in S that starts with that digit is 1213.
And so on. (End)
MATHEMATICA
a[n_] := Block[{m = 0, d = n, i = 1, l, p}, While[m <= d, l = m; m = 9 i*10^(i - 1) + l; i++ ]; i--; p = Mod[d - l, i]; q = Floor[(d - l)/i] + 10^(i - 1); If[p != 0, IntegerDigits[q][[p]], Mod[q - 1, 10]]]; pp[j_, k_] := FromDigits[ Table[ a@i, {i, j, k}]]; f[n_] := Block[{m = n, p}, If[a@n != 0, (While[p = pp[n, m]; ! PrimeQ@ p, m++ ]; p), ]]; Array[f, 29] (* Robert G. Wilson v, Mar 01 2008 *)
CROSSREFS
Sequence in context: A344365 A211770 A167461 * A091416 A162324 A235640
KEYWORD
nonn,base
AUTHOR
Marcelo Iglesias (markelo(AT)gmail.com), Feb 26 2008
EXTENSIONS
More terms from Robert G. Wilson v, Mar 01 2008
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 26 06:07 EDT 2024. Contains 375454 sequences. (Running on oeis4.)