login

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”).

Index of smallest prime number where n consecutive leading digits of the index match n consecutive leading digits in the prime.
9

%I #12 Apr 11 2019 22:50:18

%S 169,5591,6438,6455

%N Index of smallest prime number where n consecutive leading digits of the index match n consecutive leading digits in the prime.

%C Puzzle 217 on Carlos Rivera's The Prime Puzzles & Problems Connection has anticipated some of the concepts of this sequence. Several people have contributed to this puzzle and some of its terms may be seen there. In particular, the first page of the puzzle includes a term in this sequence.

%C 72258*10^37 < a(5) < 74142*10^37. - _Max Alekseyev_, Sep 29 2015

%H Carlos Rivera's The Prime Puzzles & Problems Connection, <a href="http://www.primepuzzles.net/puzzles/puzz_217.htm">Puzzle 217</a>

%F a(n) = A000720(A133584(n))

%e a(2)=5591 because this is the index of prime 55001 where n=2 and 55 in the index matches the first two leading digits of the prime.

%p A133583 := proc(n)

%p local p,i,dgsi,dgsp,d,wrks;

%p p := 2 ;

%p for i from 1 do

%p dgsi := convert(i,base,10) ;

%p dgsp := convert(p,base,10) ;

%p if nops(dgsi) >= n and nops(dgsp) >= n then

%p wrks := true;

%p for d from 1 to n do

%p if op(-d,dgsi) <> op(-d,dgsp) then

%p wrks := false ;

%p break;

%p end if;

%p end do:

%p if wrks then

%p return i;

%p end if;

%p end if;

%p p := nextprime(p) ;

%p end do:

%p end proc: # _R. J. Mathar_, Feb 14 2015

%t Table[ind = 10^(n - 1); While[Take[IntegerDigits[ind], n] !=

%t Take[IntegerDigits[Prime[ind]], n], ind++]; ind, {n, 1, 4}] (* _Robert Price_, Apr 11 2019 *)

%Y Cf. A133584.

%K more,nonn,base

%O 1,1

%A _Enoch Haga_, Sep 17 2007, Sep 18 2007