A133583 Index of smallest prime number where n consecutive leading digits of the index match n consecutive leading digits in the prime.
169, 5591, 6438, 6455
Offset: 1
Examples
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.
Links
- Carlos Rivera's The Prime Puzzles & Problems Connection, Puzzle 217
Crossrefs
Cf. A133584.
Programs
-
Maple
A133583 := proc(n) local p,i,dgsi,dgsp,d,wrks; p := 2 ; for i from 1 do dgsi := convert(i,base,10) ; dgsp := convert(p,base,10) ; if nops(dgsi) >= n and nops(dgsp) >= n then wrks := true; for d from 1 to n do if op(-d,dgsi) <> op(-d,dgsp) then wrks := false ; break; end if; end do: if wrks then return i; end if; end if; p := nextprime(p) ; end do: end proc: # R. J. Mathar, Feb 14 2015
-
Mathematica
Table[ind = 10^(n - 1); While[Take[IntegerDigits[ind], n] != Take[IntegerDigits[Prime[ind]], n], ind++]; ind, {n, 1, 4}] (* Robert Price, Apr 11 2019 *)
Comments