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”).

A043530
Number of distinct base-3 digits of n.
4
1, 1, 2, 1, 2, 2, 2, 1, 2, 2, 3, 2, 1, 2, 3, 2, 2, 2, 3, 2, 3, 2, 2, 2, 2, 1, 2, 2, 3, 2, 2, 3, 3, 3, 3, 2, 2, 3, 2, 1, 2, 3, 2, 2, 3, 3, 3, 3, 2, 2, 3, 2, 2, 2, 3, 2, 3, 3, 3, 2, 3, 2, 3, 3, 3, 3, 2, 2, 3, 2, 2, 2, 3, 2, 3, 2, 2, 2, 2, 1, 2, 2, 3, 2, 2, 3, 3, 3, 3, 2
OFFSET
1,3
COMMENTS
a(A031944(n)) = 3; a(A154314(n)) < 3. - Reinhard Zumkeller, Jan 07 2009
Image, under the coding sending i -> 1+floor(i/3), of the fixed point, starting with 0, of the morphism 0 -> 012, 1 -> 314, 2 -> 542, 3 -> 336, 4 -> 644, 5 -> 565, 6 -> 666. - Jeffrey Shallit, May 15 2016
LINKS
MATHEMATICA
Table[Length[Union[IntegerDigits[n, 3]]], {n, 90}] (* Harvey P. Dale, May 13 2020 *)
PROG
(PARI) a(n) = #vecsort(digits(n, 3), , 8); \\ Michel Marcus, May 16 2016
CROSSREFS
KEYWORD
nonn,base
STATUS
approved