OFFSET
1,2
COMMENTS
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.
The old definition was "Numbers that, when expressed in a smaller base, become a factor of themselves."
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..301
EXAMPLE
In base 7, 102 is 51, which divides 102, so 102 is in the sequence.
8 is in the sequence because 8 in base 9 is 8, which does divide 8.
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.
MATHEMATICA
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]
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 *)
PROG
(Haskell)
import Data.List (unfoldr)
a062010 n = a062010_list !! (n-1)
a062010_list = filter f [1..] where
f x = any (== 0) $ map (mod x) lower where
lower = map bas [1 + a054055 x .. 9]
bas b = foldl (\v d -> b*v + d) 0 bas10
bas10 = reverse $ unfoldr dig x where
dig n = if n== 0 then Nothing else Just $ swap $ divMod n 10
-- Reinhard Zumkeller, Oct 09 2011
CROSSREFS
KEYWORD
base,easy,nice,nonn
AUTHOR
Erich Friedman, Jun 27 2001
EXTENSIONS
Offset corrected by Reinhard Zumkeller, Oct 09 2011
Definition clarified by N. J. A. Sloane, Jul 16 2016
STATUS
approved