OFFSET
1,2
COMMENTS
1 <= a(n) <= n;
a(n) = 1 for almost all n (measure 1). - Charles R Greathouse IV, Mar 31 2016
EXAMPLE
a(48) = Min{4, 8, 48} = 4;
a(49) = Min{49} = 49;
a(120) = Min{1, 2, 12, 20, 120} = 1;
a(121) = Min{1} = 1.
PROG
(PARI) substr(a, b)=a=digits(a); b=digits(b); for(i=0, #a-#b, for(j=1, #b, if(a[i+j]!=b[j], next(2))); return(1)); 0
a(n)=fordiv(n, d, if(substr(n, d), return(d))) \\ Charles R Greathouse IV, Mar 31 2016
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Jul 21 2006
STATUS
approved