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

%I #10 Oct 11 2019 15:12:17

%S 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,

%T 23,23,24,24,25,25,25,26,26,26,27,27,27,28,28,28,29,28,29,30,29,29,31,

%U 30,30,31,31,31,31,31,32,33,31,31,34,33,32,33,33,33,34,33,34,35,33,33,36

%N Number of different ways to represent n in different bases using only decimal digits or characters (0 to 9).

%H Robert Israel, <a href="/A118716/b118716.txt">Table of n, a(n) for n = 1..10000</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Base.html">Base.</a>

%e 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.

%e Of all of these representations, 23 of them contain only decimal digits (or characters).

%p N:= 1000: # to get a(1)..a(N)

%p A:= Vector(N,1):

%p A[1]:= 0:

%p for b from 2 to N do

%p d:= ilog[b](N);

%p S:= {$1..9}:

%p for i from 1 to d do

%p S:= S union map(t -> seq(b*t+j,j=0..9),S);

%p od:

%p S:= convert(select(t -> (t<=N and t >= b-1),S),list);

%p A[S]:= map(`+`,A[S],1);

%p od:

%p convert(A, list); # _Robert Israel_, Jun 14 2016

%t 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 *)

%Y Cf. A095425, A095426, A095427, A095428, A095429, A095430, A095431, A095432, A095433.

%K base,nonn

%O 1,2

%A _Sergio Pimentel_, May 24 2006

%E Corrected by _Ray Chandler_, Jun 19 2006

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 April 23 11:35 EDT 2024. Contains 371912 sequences. (Running on oeis4.)