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.

A135993 a(0) = 0; a(n) = (floor(n/S2(n))) mod 2 for n >= 1, where S2(n) is the binary weight of n.

Original entry on oeis.org

0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1
Offset: 0

Views

Author

Ctibor O. Zizka, Mar 03 2008

Keywords

Examples

			a(17) = floor(17/2) mod 2 = 0.
a(18) = floor(18/2) mod 2 = 1.
		

Crossrefs

Programs

  • PARI
    a(n) = if (n==0, 0, n\hammingweight(n) % 2); \\ Michel Marcus, Feb 04 2016

Formula

a(n) = A135941(n) mod 2 for n > 0. - Michel Marcus, Feb 04 2016

Extensions

Converted references into links - R. J. Mathar, Oct 30 2009