login
Number of digits in base-9 representation of n.
4

%I #9 Nov 18 2025 12:02:07

%S 1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,

%T 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,

%U 2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3

%N Number of digits in base-9 representation of n.

%H Paolo Xausa, <a href="/A390767/b390767.txt">Table of n, a(n) for n = 0..10000</a>

%F a(n) = floor(log_9(n)) + 1, for n >= 1.

%e a(1000) = 4 because 1000 = 1331_9 (4 digits).

%t A390767[n_] := If[n == 0, 1, IntegerLength[n, 9]];

%t Array[A390767, 100, 0]

%Y Cf. analogous sequences for other bases: A070939 (base 2), A081604 (base 3), A110591 (base 4), A110592 (base 5), A390764 (base 6), A390765 (base 7), A390766 (base 8), A055642 (base 10).

%Y Cf. A007095.

%K nonn,base,easy

%O 0,10

%A _Paolo Xausa_, Nov 18 2025