A304023 a(n) is the smallest integer with n digits in base 3/2 expressed in base 3/2.
0, 20, 210, 2100, 21010, 210110, 2101100, 21011000, 210110000, 2101100010, 21011000110, 210110001100, 2101100011010, 21011000110100, 210110001101000, 2101100011010010, 21011000110100110, 210110001101001100, 2101100011010011010, 21011000110100110100, 210110001101001101010
Offset: 1
Examples
The number 5 in base 3/2 is 22, and the number 6 is 210. Therefore, 210 is the smallest three-digit integer.
Links
- B. Chen, R. Chen, J. Guo, S. Lee et al., On Base 3/2 and its Sequences, arXiv:1808.04304 [math.NT], 2018.
Crossrefs
Programs
-
Maple
b:= proc(n) b(n):= `if`(n=1, 1, 3*ceil(b(n-1)/2)) end: g:= proc(n) g(n):= `if`(n<2, 0, irem(n, 3, 'q')+g(2*q)*10) end: a:= n-> g(b(n)): seq(a(n), n=1..30); # Alois P. Heinz, Feb 13 2021
-
PARI
f(n) = if( n<1, 0, f(n\3 * 2) * 10 + n%3); a(n) = {my(k=0); while(#Str(f(k)) != n, k++); f(k);} \\ Michel Marcus, Jun 19 2018
-
Python
def f(n): return 0 if n < 1 else f(n//3*2)*10 + n%3 def a(n): k = 0 while len(str(f(k))) != n: k += 1 return f(k) print([a(n) for n in range(1, 22)]) # Michael S. Branicky, Feb 12 2021 after Michel Marcus
Formula
Extensions
More terms from Michel Marcus, Jun 19 2018
Comments