Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #13 Mar 05 2024 16:32:35
%S 1234567891,2,3,4567,5,67,7,89,9101112131,101,11,11,1213,2,13,3,
%T 14151617,41,151,5,
%U 16171819202122232425262728293031323334353637383940414243,61,17,7,181,81920212223242526272829303,19,920212223242526272829303132333435363738394041424344454647484950515253
%N Consider the infinite string S = 12345678910111213141516171819202122232425262728293031... Sequence gives the first prime that starts at the k-th digit, skipping zero digits.
%C a(67)>10^5000. - _Robert G. Wilson v_, Mar 01 2008
%H Robert G. Wilson v, <a href="/A135605/b135605.txt">Table of n, a(n) for n=1..66</a>
%e Examples from _N. J. A. Sloane_, Feb 24 2021: (Start)
%e S = 1234567891011121314151617181920212...
%e The 10th digit is a 1, and the first prime in S that starts with that digit is 101.
%e The 11th digit is 0, so we skip it.
%e The 12th digit is 1, and the first prime in S that starts with that digit is 11.
%e The 13th digit is another 1, and the first prime in S that starts with that digit is another 11.
%e The 14th digit is another 1, and the first prime in S that starts with that digit is 1213.
%e And so on. (End)
%t 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 *)
%Y Cf. A007376, A033307, A073175, A073175, A103575.
%K nonn,base
%O 1,1
%A Marcelo Iglesias (markelo(AT)gmail.com), Feb 26 2008
%E More terms from _Robert G. Wilson v_, Mar 01 2008