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

A081608
Number of numbers <= n having no 0 in their ternary representation.
6
0, 1, 2, 2, 3, 4, 4, 5, 6, 6, 6, 6, 6, 7, 8, 8, 9, 10, 10, 10, 10, 10, 11, 12, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 16, 17, 18, 18, 18, 18, 18, 19, 20, 20, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 24, 24, 25, 26, 26, 26, 26
OFFSET
0,3
COMMENTS
a(n) + A081607(n) = n+1.
LINKS
MATHEMATICA
Accumulate[Table[If[DigitCount[n, 3, 0]==0, 1, 0], {n, 0, 80}]] (* Harvey P. Dale, Oct 21 2024 *)
PROG
(PARI) first(n)=my(s, t); vector(n, k, t=Set(digits(k, 3)); s+=!!t[1]) \\ Charles R Greathouse IV, Sep 02 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Mar 23 2003
STATUS
approved