%I #26 Jul 16 2016 09:53:15
%S 1,2,3,4,5,6,7,8,10,12,20,21,30,40,100,102,112,120,200,204,210,300,
%T 306,312,400,414,420,516,522,624,630,1000,1010,1102,1120,1232,1320,
%U 1344,1422,2000,2223,2240,2301,2310,3000,3430,4000,10000,10100,10101,10356
%N Let n = Sum_i d_i*10^i (0 <= d_i <= 9) be the decimal expansion of n. Then n is in the sequence if Sum_i d_i*b^i divides n for some base b >= 2 in the range max d_i < b < 10.
%C In other words, a positive number n is in the sequence if when interpreted as a legal number in a smaller base than 10, the result divides n.
%C The old definition was "Numbers that, when expressed in a smaller base, become a factor of themselves."
%H Reinhard Zumkeller, <a href="/A062010/b062010.txt">Table of n, a(n) for n = 1..301</a>
%e In base 7, 102 is 51, which divides 102, so 102 is in the sequence.
%e 8 is in the sequence because 8 in base 9 is 8, which does divide 8.
%e But 9 is not in the sequence because there are no bases b between 9 and 10. Likewise all numbers with a 9 in their decimal expansion are excluded.
%t dtn[L_, b_] := Fold[b#1+#2&, 0, L]; f[n_] := f[n]=Table[dtn[ IntegerDigits[ n, b], 10], {b, 2, 9}]; g[n_] := MemberQ[Flatten[ Map[ f, Divisors[ n]]], n]; Select[Range[20000], g]
%t rdnQ[n_]:=AnyTrue[n/FromDigits[IntegerDigits[n],Range[ Max[ IntegerDigits[ n]]+1,9]], IntegerQ]; Select[Range[11000],rdnQ] (* The program uses the AnyTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Jul 16 2016 *)
%o (Haskell)
%o import Data.List (unfoldr)
%o a062010 n = a062010_list !! (n-1)
%o a062010_list = filter f [1..] where
%o f x = any (== 0) $ map (mod x) lower where
%o lower = map bas [1 + a054055 x .. 9]
%o bas b = foldl (\v d -> b*v + d) 0 bas10
%o bas10 = reverse $ unfoldr dig x where
%o dig n = if n== 0 then Nothing else Just $ swap $ divMod n 10
%o -- _Reinhard Zumkeller_, Oct 09 2011
%Y Cf. A054055.
%K base,easy,nice,nonn
%O 1,2
%A _Erich Friedman_, Jun 27 2001
%E Offset corrected by _Reinhard Zumkeller_, Oct 09 2011
%E Definition clarified by _N. J. A. Sloane_, Jul 16 2016