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.

A308343 a(n) is the difference between the number of zeros and the number of ones among the first n terms of the Ehrenfeucht-Mycielski sequence A038219.

Original entry on oeis.org

1, 0, 1, 2, 1, 0, 1, 0, 1, 0, -1, -2, -1, 0, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 0, -1, 0, 1, 0, 1, 0, 1, 2, 1, 2, 3, 2, 1, 0, 1, 0, 1, 2, 3, 2, 1, 2, 3, 4, 5, 6, 5, 6, 5, 4, 5, 4, 3, 2, 1, 0, 1, 2, 1, 0, 1, 2, 1, 0, -1, -2, -3, -4, -3, -4, -3, -4, -3, -4, -5, -4
Offset: 1

Views

Author

Rémy Sigrist, May 21 2019

Keywords

Examples

			The first terms, alongside the numbers of zeros and of ones and A038219(n), are:
  n   a(n)  #0's  #1's  A038219(n)
  --  ----  ----  ----  ----------
   1     1     1     0           0
   2     0     1     1           1
   3     1     2     1           0
   4     2     3     1           0
   5     1     3     2           1
   6     0     3     3           1
   7     1     4     3           0
   8     0     4     4           1
   9     1     5     4           0
  10     0     5     5           1
  11    -1     5     6           1
  12    -2     5     7           1
		

Crossrefs

Cf. A038219.

Programs

  • Perl
    See Links section.

Formula

a(n) = Sum_{k = 1..n} (-1)^A038219(k).