The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A081610 Number of numbers <= n having at least one 2 in their ternary representation. 8
 0, 0, 1, 1, 1, 2, 3, 4, 5, 5, 5, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 19, 19, 20, 20, 20, 21, 22, 23, 24, 24, 24, 25, 25, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,6 COMMENTS a(n) + A081611(n) = n+1. Partial sums of A189820. LINKS Nathaniel Johnston, Table of n, a(n) for n = 0..10000 FORMULA a(n) ~ n. - Charles R Greathouse IV, Sep 02 2015 MAPLE num2tern := proc(n) return numboccur(convert(n, base, 3), 2): end: a:=0: for n from 0 to 80 do a:=a+`if`(num2tern(n)>0, 1, 0): printf("%d, ", a): od: # Nathaniel Johnston, May 17 2011 MATHEMATICA Accumulate[Table[If[DigitCount[n, 3, 2]>0, 1, 0], {n, 0, 70}]] (* Harvey P. Dale, Aug 20 2012 *) PROG (PARI) first(n)=my(s, t); vector(n, k, t=Set(digits(k, 3)); s+=t[#t]==2) \\ Charles R Greathouse IV, Sep 02 2015 CROSSREFS Cf. A007089, A081603, A081607, A081609, A189820. Sequence in context: A087177 A180600 A006159 * A063273 A349481 A200262 Adjacent sequences:  A081607 A081608 A081609 * A081611 A081612 A081613 KEYWORD nonn,easy AUTHOR Reinhard Zumkeller, Mar 23 2003 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 8 17:55 EDT 2022. Contains 356016 sequences. (Running on oeis4.)