|
|
A340051
|
|
Mixed-radix representation of n where the least significant digit is in base 3 and other digits are in base 2.
|
|
2
|
|
|
0, 1, 2, 10, 11, 12, 100, 101, 102, 110, 111, 112, 1000, 1001, 1002, 1010, 1011, 1012, 1100, 1101, 1102, 1110, 1111, 1112, 10000, 10001, 10002, 10010, 10011, 10012, 10100, 10101, 10102, 10110, 10111, 10112, 11000, 11001, 11002, 11010, 11011, 11012, 11100, 11101
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 10*A007088(floor(n/3)) + (n mod 3).
G.f.: x*(1+2*x)/(1-x^3) + 10/(1-x) * Sum_{k>=0} 10^k*x^(3*2^k)/(1 + x^(3*2^k)).
|
|
PROG
|
(PARI) a(n) = my(r); [n, r]=divrem(n, 3); fromdigits(concat(binary(n), r));
|
|
CROSSREFS
|
Cf. A096304 (interpreted as ternary).
|
|
KEYWORD
|
base,easy,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|