login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A118716 Number of different ways to represent n in different bases using only decimal digits or characters (0 to 9). 2
1, 3, 4, 5, 6, 7, 8, 9, 10, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 25, 26, 26, 26, 27, 27, 27, 28, 28, 28, 29, 28, 29, 30, 29, 29, 31, 30, 30, 31, 31, 31, 31, 31, 32, 33, 31, 31, 34, 33, 32, 33, 33, 33, 34, 33, 34, 35, 33, 33, 36 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
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
Sequence in context: A243196 A247485 A154781 * A004177 A004721 A333838
KEYWORD
base,nonn
AUTHOR
Sergio Pimentel, May 24 2006
EXTENSIONS
Corrected by Ray Chandler, Jun 19 2006
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 05:02 EDT 2024. Contains 371235 sequences. (Running on oeis4.)