A246435 Length of representation of n in fractional base 3/2.
1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9
Offset: 0
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
- B. Chen, R. Chen, J. Guo, S. Lee et al., On Base 3/2 and its sequences, arXiv:1808.04304 [math.NT], 2018.
- Index entries for sequences related to fractional bases.
Programs
-
Haskell
a246435 n = if n < 3 then 1 else a246435 (2 * div n 3) + 1 -- Reinhard Zumkeller, Sep 05 2014
-
Mathematica
a[n_] := If[n < 3, 1, a[2 Quotient[n, 3]] + 1]; Array[a, 100, 0] (* Jean-François Alcover, Feb 05 2019 *)
-
PARI
a(n) = if(n < 3, 1, a(n\3 * 2) + 1); \\ Amiram Eldar, Jul 30 2025