OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Base.
EXAMPLE
a(27) = 23 because the representation of 27 in unary, binary, ternary, quaternary, etc... bases is as follows: 111111111111111111111111111, 11011, 1000, 123, 102, 43, 36, 33, 30, 27, 25, 23, 21, 1D, 1C, 1B, 1A, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, R, R, R, R..... etc.
Of all of these representations, 23 of them contain only decimal digits (or characters).
MAPLE
N:= 1000: # to get a(1)..a(N)
A:= Vector(N, 1):
A[1]:= 0:
for b from 2 to N do
d:= ilog[b](N);
S:= {$1..9}:
for i from 1 to d do
S:= S union map(t -> seq(b*t+j, j=0..9), S);
od:
S:= convert(select(t -> (t<=N and t >= b-1), S), list);
A[S]:= map(`+`, A[S], 1);
od:
convert(A, list); # Robert Israel, Jun 14 2016
MATHEMATICA
f[n_] := 1 + If[n == 1, 0, Length@Select[Table[IntegerDigits[n, b], {b, 2, n + 1}], Apply[And, Map[ # < 10 &, # ]] &]]; Table[f[n], {n, 72}] (* Ray Chandler, Jun 19 2006 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Sergio Pimentel, May 24 2006
EXTENSIONS
Corrected by Ray Chandler, Jun 19 2006
STATUS
approved