login
Consider a number n with m decimal digits. The sequence lists the numbers n having the suffix of length m-1 in the middle of the decimal expansion of prime(n).
1

%I #4 May 31 2014 00:53:53

%S 33,55,56,80,81,82,83,109,278,287,897,898,899,910,912,915,917,918,919,

%T 920,921,939,941,945,948,2004,3004,3005,4008,4009,5006,6003,6455,6456,

%U 6457,6459,6460,6466,7007,8009,9001,10053,20053,46321,50021,60078,70027,74685

%N Consider a number n with m decimal digits. The sequence lists the numbers n having the suffix of length m-1 in the middle of the decimal expansion of prime(n).

%C The corresponding primes are 137, 257, 263, 409, 419, 421, 431, 599, 1789, 1873, 6977, 6983, 6991, 7103, 7121, 7151, 7177, 7187, ...

%e 287 is in the sequence because prime(287) = 1873 and the suffix 87 is in the middle of the decimal expansion of 1873.

%t lst={};Do[a=IntegerDigits[Prime[n]];b=Length[a];l=IntegerLength[n]-1;c=IntegerLength[Mod[n,10^l]];If[Mod[n,10^l]==0,c=1];If[EvenQ[b-c]&&FromDigits[Take[a,{(b-c)/2+1,(b+c)/2}]]==Mod[n,10^l],AppendTo[lst,n]],{n,26,10^5}];lst

%Y Cf. A242956.

%K nonn,base

%O 1,1

%A _Michel Lagneau_, May 27 2014