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.

Showing 1-1 of 1 results.

A339975 a(n) is the number of 0's minus the number of 1's among the first n terms of A337546.

Original entry on oeis.org

0, 1, 0, 1, 2, 1, 0, 1, 0, 1, 2, 1, 2, 1, 0, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 3, 2, 3, 2, 1, 2, 1, 2, 3, 2, 1, 2, 1, 0, 1, 2, 1, 2, 1, 0, 1, 0, 1, 2, 1, 0, 1, 2, 1, 2, 1, 0, 1, 2, 1, 0, 1, 0, 1, 2, 1, 0, 1, 2, 1, 2, 1, 0, 1, 0, 1, 2, 1, 0, 1, 0, -1, 0, 1, 0, 1, 0
Offset: 0

Views

Author

Rémy Sigrist, Dec 25 2020

Keywords

Comments

See A339976 for the positions of 0's.

Examples

			For n = 5, the first 5 terms of A337546 are 0, 1, 0, 0, 1, so a(5) = 3 - 2 = 1.
		

Crossrefs

Programs

  • C
    See Links section.

Formula

a(n) = Sum_{k = 1..n} (-1)^A337546(n).
a(n) = n - 2*Sum_{k = 1..n} A337546(n).
Showing 1-1 of 1 results.