cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A077267 Number of zeros in base-3 expansion of n.

Original entry on oeis.org

1, 0, 0, 1, 0, 0, 1, 0, 0, 2, 1, 1, 1, 0, 0, 1, 0, 0, 2, 1, 1, 1, 0, 0, 1, 0, 0, 3, 2, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 0, 0, 1, 0, 0, 2, 1, 1, 1, 0, 0, 1, 0, 0, 3, 2, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 0, 0, 1, 0, 0, 2, 1, 1, 1, 0, 0, 1, 0, 0, 4, 3, 3, 3, 2, 2, 3, 2, 2, 3, 2, 2, 2, 1, 1, 2, 1, 1, 3, 2, 2, 2, 1, 1, 2
Offset: 0

Views

Author

Henry Bottomley, Nov 01 2002

Keywords

Examples

			a(8)=0 since 8 written in base 3 is 22 with 0 zeros;
a(9)=2 since 9 written in base 3 is 100 with 2 zeros;
a(10)=1 since 10 written in base 3 is 101 with 1 zero.
		

Crossrefs

Programs

Formula

a(1)=a(2)=0; a(3n)=a(n)+1; a(3n+1)=a(3n+2)=a(n). a(3^n-2)=a(3^n-1)=0; a(3^n)=n. a(n)=A077266(n, 3).
a(n) + A062756(n) + A081603(n) = A081604(n). - Reinhard Zumkeller, Mar 23 2003
G.f.: (Sum_{k>=0} x^(3^(k+1))/(1 + x^(3^k) + x^(2*3^k)))/(1-x). - Franklin T. Adams-Watters, Nov 03 2005
a(n) = A079978(n) if n < 3, A079978(n) + a(floor(n/3)) otherwise. - Reinhard Zumkeller, Feb 21 2013

Extensions

a(0)=1 added, offset changed to 0 and b-file adjusted by Reinhard Zumkeller, Feb 21 2013
Wrong formula deleted by Reinhard Zumkeller, Feb 21 2013