%I #5 May 13 2013 01:48:45
%S 101,10111,101221,10001231,101123441,1001233451,1012345661,
%T 101123456671,101223456781,1012334567891
%N Smallest prime made up of strings of all first n digits concatenated in ascending order and sandwiched between two 1's.
%e a(6)=1001233451 because the first 6 digits 0,1,2,3.4,5 appear in this order as concatenated strings of 00,1,2,33,4,5 in between the two end 1's ; This prime is the smallest since it is followed by 1011234451,10012334551,10122223451,...
%o (Shell) # Run on a list of primes
%o grep -m1 '^10+1$' primelistgrep -m1 '^10+1+1$' primelist
%o grep -m1 '^10+1+2+1$' primelist
%o grep -m1 '^10+1+2+3+1$' primelist
%o grep -m1 '^10+1+2+3+4+1$' primelist
%o grep -m1 '^10+1+2+3+4+5+1$' primelist
%o grep -m1 '^10+1+2+3+4+5+6+1$' primelist
%o grep -m1 '^10+1+2+3+4+5+6+7+1$' primelist
%o grep -m1 '^10+1+2+3+4+5+6+7+8+1$' primelist
%o grep -m1 '^10+1+2+3+4+5+6+7+8+9+1$' primelist
%K fini,full,nonn,base
%O 1,1
%A _Lekraj Beedassy_, Dec 09 2007
%E Program from _Charles R Greathouse IV_, Nov 19 2010.
|