login
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
OFFSET
0,3
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. A007088 (base 2).
Cf. A096304 (interpreted as ternary).
Sequence in context: A169683 A134948 A060045 * A000462 A340649 A309942
KEYWORD
base,easy,nonn
AUTHOR
Kevin Ryde, Apr 24 2021
STATUS
approved