login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A024629
n written in fractional base 3/2.
33
0, 1, 2, 20, 21, 22, 210, 211, 212, 2100, 2101, 2102, 2120, 2121, 2122, 21010, 21011, 21012, 21200, 21201, 21202, 21220, 21221, 21222, 210110, 210111, 210112, 212000, 212001, 212002, 212020, 212021, 212022, 212210, 212211, 212212, 2101100, 2101101
OFFSET
0,3
COMMENTS
A246435(n) = (number of digits in a(n)) = A055642(a(n)). - Reinhard Zumkeller, Sep 05 2014
The number of positive even n such that a(n) has k+1 digits is A005428(k). - Glen Whitney, Jul 09 2017
The position of the rightmost "2" digit in a(3k), k >= 1, appears to be A087088(k). - Peter Munn, Jun 24 2020 [updated Peter Munn, Jul 14 2020 for new A087088 offset]
LINKS
Matvey Borodin, Hannah Han, Kaylee Ji, Tanya Khovanova, Alexander Peng, David Sun, Isabel Tu, Jason Yang, William Yang, Kevin Zhang, and Kevin Zhao, Variants of Base 3 over 2, arXiv:1901.09818 [math.NT], 2019.
B. Chen, R. Chen, J. Guo, S. Lee et al, On Base 3/2 and its sequences, arXiv:1808.04304 [math.NT], 2018.
Michel Dekking, The Thue-Morse sequence in base 3/2, arXiv:2301.13563 [math.CO], 2023. See also J. Int. Seq., Vol. 26 (2023), Article 23.2.3.
Tanya Khovanova and Kevin Wu, Base 3/2 and Greedily Partitioned Sequences, arXiv:2007.09705 [math.NT], 2020.
J. S. Tanton, A collection of research problems. [archived version]
FORMULA
To represent a number in base b, if a digit is >= b, subtract b and carry 1. In fractional base a/b, subtract a and carry b.
a(0)=0, a(3n+r) = 10*a(2n)+r for n >= 0 and r = 0, 1, 2. - Jianing Song, Oct 15 2022
EXAMPLE
Representations of the first few numbers are:
0 = 0
1 = 1
2 = 2
3 = 2 0
4 = 2 1
5 = 2 2
6 = 2 1 0
7 = 2 1 1
8 = 2 1 2
9 = 2 1 0 0
10 = 2 1 0 1
11 = 2 1 0 2
12 = 2 1 2 0
13 = 2 1 2 1
14 = 2 1 2 2
15 = 2 1 0 1 0
[extended and reformatted by Peter Munn, Jun 27 2020]
MAPLE
a:= proc(n) `if`(n<1, 0, irem(n, 3, 'q')+a(2*q)*10) end:
seq(a(n), n=0..45); # Alois P. Heinz, Jun 19 2018
MATHEMATICA
a[ n_] := If[ n < 1, 0, a[ Quotient[n, 3] 2] 10 + Mod[ n, 3]]; (* Michael Somos, Jun 18 2014 *)
PROG
(Sage)
def basepqExpansion(p, q, n):
L, i = [n], 1
while L[i-1] >= p:
x=L[i-1]
L[i-1]=x.mod(p)
L.append(q*(x//p))
i+=1
L.reverse()
return Integer(''.join(str(x) for x in L))
[basepqExpansion(3, 2, n) for n in [0..40]] # - Tom Edgar, Hailey R. Olafson, and James Van Alstine, Jun 17 2014; modified and corrected by G. C. Greubel, Aug 20 2019
(PARI) {a(n) = if( n<1, 0, a(n\3 * 2) * 10 + n%3)}; /* Michael Somos, Jun 18 2014 */
(Haskell)
a024629 0 = 0
a024629 n = 10 * a024629 (2 * n') + t where (n', t) = divMod n 3
-- Reinhard Zumkeller, Sep 05 2014
CROSSREFS
Cf. A081848, A087088, A246435 (string lengths), A244040 (digit sums).
Sequence in context: A338994 A217394 A072998 * A235500 A319953 A111193
KEYWORD
nonn,base
EXTENSIONS
Tanton link corrected by Charles R Greathouse IV, Oct 20 2008
STATUS
approved