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.

A254044 a(1) = 1, for n>1: a(n) = a(A253889(n)) + (1 if n is of the form 3n or 3n+1, otherwise 0).

Original entry on oeis.org

1, 1, 2, 2, 1, 3, 3, 2, 3, 2, 2, 3, 2, 1, 4, 4, 3, 4, 5, 3, 3, 3, 2, 4, 3, 3, 5, 3, 2, 4, 5, 2, 2, 5, 3, 3, 4, 2, 3, 3, 1, 5, 4, 4, 4, 5, 4, 4, 4, 3, 3, 4, 4, 5, 5, 5, 5, 4, 3, 2, 3, 3, 4, 4, 3, 7, 4, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 5, 5, 5, 6, 5, 3, 4, 5, 2, 5, 4, 4, 5, 5, 5, 5, 5, 2, 5, 7, 2, 3, 4, 5, 5, 6, 3, 6, 5, 3, 6, 3, 4, 5, 5, 2, 7, 5, 3, 5, 2, 3, 5, 7, 1, 4, 6, 5, 5, 3, 4
Offset: 1

Views

Author

Antti Karttunen, Jan 23 2015

Keywords

Crossrefs

Positions of ones: A007051.

Formula

a(1) = 1, for n>1: a(n) = a(A253889(n)) + [n is of the form 3n or 3n+1, i.e., in A032766] (Here [ ] is Iverson bracket).
a(1) = 0, thereafter, if n = 3k+2, then a(n) = a((n+1)/3), otherwise a(n) = 1 + a(A253889(n)).
a(n) = A000120(A064216(n)). [Binary weight of terms of A064216.]
a(n) = A253894(n) - A254045(n).
Other identities:
a(A007051(n)) = 1 for all n >= 0. [And no 1's in any other positions.]