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!)
A024629 n written in fractional base 3/2. 33

%I #74 Mar 24 2023 15:55:00

%S 0,1,2,20,21,22,210,211,212,2100,2101,2102,2120,2121,2122,21010,21011,

%T 21012,21200,21201,21202,21220,21221,21222,210110,210111,210112,

%U 212000,212001,212002,212020,212021,212022,212210,212211,212212,2101100,2101101

%N n written in fractional base 3/2.

%C A246435(n) = (number of digits in a(n)) = A055642(a(n)). - _Reinhard Zumkeller_, Sep 05 2014

%C The number of positive even n such that a(n) has k+1 digits is A005428(k). - _Glen Whitney_, Jul 09 2017

%C 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]

%H Reinhard Zumkeller, <a href="/A024629/b024629.txt">Table of n, a(n) for n = 0..10000</a>

%H Matvey Borodin, Hannah Han, Kaylee Ji, Tanya Khovanova, Alexander Peng, David Sun, Isabel Tu, Jason Yang, William Yang, Kevin Zhang, and Kevin Zhao, <a href="https://arxiv.org/abs/1901.09818">Variants of Base 3 over 2</a>, arXiv:1901.09818 [math.NT], 2019.

%H B. Chen, R. Chen, J. Guo, S. Lee et al, <a href="http://arxiv.org/abs/1808.04304">On Base 3/2 and its sequences</a>, arXiv:1808.04304 [math.NT], 2018.

%H Michel Dekking, <a href="https://arxiv.org/abs/2301.13563">The Thue-Morse sequence in base 3/2</a>, arXiv:2301.13563 [math.CO], 2023. See also J. Int. Seq., Vol. 26 (2023), <a href="https://cs.uwaterloo.ca/journals/JIS/VOL26/Dekking/dek25.html">Article 23.2.3</a>.

%H Tanya Khovanova and Kevin Wu, <a href="https://arxiv.org/abs/2007.09705">Base 3/2 and Greedily Partitioned Sequences</a>, arXiv:2007.09705 [math.NT], 2020.

%H J. S. Tanton, <a href="https://web.archive.org/web/20150210004624/http://www.themathcircle.org/researchproblems.php">A collection of research problems</a>. [archived version]

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

%F a(0)=0, a(3n+r) = 10*a(2n)+r for n >= 0 and r = 0, 1, 2. - _Jianing Song_, Oct 15 2022

%e Representations of the first few numbers are:

%e 0 = 0

%e 1 = 1

%e 2 = 2

%e 3 = 2 0

%e 4 = 2 1

%e 5 = 2 2

%e 6 = 2 1 0

%e 7 = 2 1 1

%e 8 = 2 1 2

%e 9 = 2 1 0 0

%e 10 = 2 1 0 1

%e 11 = 2 1 0 2

%e 12 = 2 1 2 0

%e 13 = 2 1 2 1

%e 14 = 2 1 2 2

%e 15 = 2 1 0 1 0

%e [extended and reformatted by _Peter Munn_, Jun 27 2020]

%p a:= proc(n) `if`(n<1, 0, irem(n, 3, 'q')+a(2*q)*10) end:

%p seq(a(n), n=0..45); # _Alois P. Heinz_, Jun 19 2018

%t a[ n_] := If[ n < 1, 0, a[ Quotient[n, 3] 2] 10 + Mod[ n, 3]]; (* _Michael Somos_, Jun 18 2014 *)

%o (Sage)

%o def basepqExpansion(p,q,n):

%o L, i = [n], 1

%o while L[i-1] >= p:

%o x=L[i-1]

%o L[i-1]=x.mod(p)

%o L.append(q*(x//p))

%o i+=1

%o L.reverse()

%o return Integer(''.join(str(x) for x in L))

%o [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

%o (PARI) {a(n) = if( n<1, 0, a(n\3 * 2) * 10 + n%3)}; /* _Michael Somos_, Jun 18 2014 */

%o (Haskell)

%o a024629 0 = 0

%o a024629 n = 10 * a024629 (2 * n') + t where (n', t) = divMod n 3

%o -- _Reinhard Zumkeller_, Sep 05 2014

%Y Cf. A081848, A087088, A246435 (string lengths), A244040 (digit sums).

%K nonn,base

%O 0,3

%A _David W. Wilson_

%E Tanton link corrected by _Charles R Greathouse IV_, Oct 20 2008

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 July 12 17:26 EDT 2024. Contains 374251 sequences. (Running on oeis4.)