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!)
A276326 Numbers expressed in greedy A001563-base. 12

%I #29 Sep 01 2016 10:54:15

%S 0,1,2,3,10,11,12,13,20,21,22,23,30,31,32,33,40,41,100,101,102,103,

%T 110,111,112,113,120,121,122,123,130,131,132,133,140,141,200,201,202,

%U 203,210,211,212,213,220,221,222,223,230,231,232,233,240,241,300,301,302,303,310,311,312,313,320,321,322,323,330,331,332,333,340,341,400

%N Numbers expressed in greedy A001563-base.

%C Terms A001563(1) = 1, A001563(2) = 4, A001563(3) = 18, ... give the base values for the digit positions from 1 onward. Digit places are filled by always trying to find the largest possible term of A001563 that still fits into the sum.

%C A130744(8) = 3225600 = 10*A001563(8) is the first number which yields an ambiguous representation when expressed in decimal, because in this base it is actually "A0000000" (where digit "A" stands for ten).

%H Antti Karttunen, <a href="/A276326/b276326.txt">Table of n, a(n) for n = 0..4320</a>

%e To recover n from a(n) the digits in positions i = 1, 2, 3, ... (starting indexing from the least significant digit at right) are multiplied by A001563(i) and added together:

%e ----------------

%e n a(n)

%e ----------------

%e 0 0

%e 1 1

%e 2 2

%e 3 3

%e 4 10

%e 5 11

%e 6 12

%e 7 13

%e 8 20

%e 9 21

%e 10 22

%e 11 23

%e 12 30

%e 13 31

%e 14 32

%e 15 33

%e 16 40

%e 17 41 (as 4*A001563(2) + 1*A001563(1) = 17)

%e 18 100 (as 1*A001563(3) + 0*A001563(2) + 0*A001563(1) = 18)

%e and:

%e 3225599 99111111 (as 3225599 = 9*b(8) + 9*b(7) + b(6) + b(5) + b(4) + b(3) + b(2) + b(1)), where b(n) = A001563(n).

%t f[n_] := Block[{a = {{0, n}}}, Do[AppendTo[a, {First@ #, Last@ #} &@ QuotientRemainder[a[[-1, -1]], (# #!) &[# - i]]], {i, 0, # - 1}] &@ NestWhile[# + 1 &, 0, (# #!) &[# + 1] <= n &]; Rest[a][[All, 1]]]; Table[FromDigits@ f@ n, {n, 72}] (* _Michael De Vlieger_, Aug 31 2016 *)

%o (Scheme)

%o (define (A276326 n) (let loop ((n n) (s 0)) (if (zero? n) s (let ((dig (A276333 n))) (if (> dig 9) (error "A276326: ambiguous representation of n, digit > 9 would be needed: " n dig) (loop (A276335 n) (+ s (* dig (expt 10 (- (A258198 n) 1))))))))))

%Y Cf. A001563, A130744, A258198, A276335.

%Y Cf. A276327 (the least significant nonzero digit).

%Y Cf. A276328 (the sum of digits).

%Y Cf. A276333 (the most significant digit).

%Y Cf. A276336 (a largest digit).

%Y Cf. A276337 (number of nonzero digits).

%Y Cf. A033312 (repunits).

%Y Cf. A276091 (no digits larger than one).

%Y Differs from A007090 for the first time at n=16 and from A055655 at n=18.

%Y Cf. also A007623, A007961, A000433, A014418, A265747.

%K nonn,base

%O 0,3

%A _Antti Karttunen_, Aug 30 2016

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 June 28 01:30 EDT 2024. Contains 373761 sequences. (Running on oeis4.)