A075902 Primes p = prime(k) such that the decimal representation of p contains k as a substring.
17, 64553, 64567, 64577, 64591, 64601, 64661, 99551, 4303027, 6440999, 14968819, 95517973, 527737957, 1893230839, 1966640443, 1246492090901
Offset: 1
Examples
Pairs {n, prime(n)}: {7, 17}, {6455, 64553}, {6456, 64567}, {6457, 64577}, {6459, 64591}, {6460, 64601}, {6466, 64661}, {9551, 99551}, {303027, 4303027}, {440999, 6440999}, {968819, 14968819}, {5517973, 95517973}.
Programs
-
Mathematica
Prime[Select[Range[10^6], StringContainsQ[ToString[Prime[#]], ToString[#]] & ]] (* Robert Price, May 27 2019 *)
-
Python
from sympy import primerange [print(i,end=', ') for n,i in enumerate(primerange(1,10**7)) if str(n+1) in str(i)] # Nicholas Stefan Georgescu, Jan 03 2025
Extensions
3 more terms from Carlos Rivera, Jun 16 2004
a(16) from Donovan Johnson, May 08 2010
Comments