Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #25 Sep 12 2016 18:18:28
%S 25011,52647,72753,122313,168699,283251,324021,598041,783441,804131,
%T 837207,924807,1247241,1905759,2514819,3461101,3514077,3617389,
%U 3905817,4112913,4142139,4203151,4229871,4283679,4531907,4628827,4828443,5380413,5478091,5632671,5714889,5818569,5989269,5990961
%N Numbers that end with decimal digit 1, 3, 7, or 9 and that produce only composite numbers when any of the digits 0,1,...,9 is inserted anywhere in them (including at the beginning or end).
%C Since digit 0 can be inserted at the beginning of a term, each term must be composite.
%H Max Alekseyev, <a href="/A125268/b125268.txt">Table of n, a(n) for n = 1..972</a> (all terms below 10^8)
%p filter:= proc(n) local x,y,d,t;
%p x:= n; y:= 0;
%p for d from 0 to ilog10(n)+1 do
%p for t from 0 to 9 do
%p if isprime(10^(d+1)*x+10^d*t + y) then return false fi;
%p od;
%p t:= x mod 10;
%p y:= y + 10^d*t;
%p x:= (x-t)/10;
%p od;
%p true
%p end proc:
%p select(filter, [seq(seq(10*i+j,j=[1,3,7,9]),i=0..10^6)]); # _Robert Israel_, Sep 12 2016
%o (PARI) { printA125268(U=8) = my(v,t); v=vector(10^U); forprime(p=11,10^(U+1), if(p<=U,v[p]=p); for(i=1,#Str(p), t=(p\10^i) * 10^(i-1) + (p%10^(i-1)); if(#Str(t)==#Str(p)-1,v[t]=p););); forstep(n=1,10^U,2, if(n%10==5||v[n],next); print1(n,", ");); } \\ prints terms below 10^U, by _Max Alekseyev_, Sep 12 2016
%Y Cf. A003459, A124665
%K nonn,base
%O 1,1
%A _I. J. Kennedy_, Jan 15 2007
%E Corrected and extended by _Robert G. Wilson v_, Jan 26 2007
%E Removed incorrect terms and extended by _Max Alekseyev_, Sep 12 2016