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.

A030300 Runs have lengths 2^n, n >= 0.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

An example of a sequence with property that the fraction of 1's in the first n terms does not converge to a limit. - N. J. A. Sloane, Sep 24 2007
Image, under the coding sending a,d,e -> 1 and b,c -> 0, of the fixed point, starting with a, of the morphism a -> ab, b -> cd, c -> ee, d -> eb, e -> cc. - Jeffrey Shallit, May 14 2016
This sequence taken as digits of a base-b fraction is g(1/b) = Sum_{n>=1} a(n)/b^n = b/(b-1) * Sum_{k>=0} (-1)^k/b^(2^k) per the generating function below. With initial 0, it is binary expansion .01001111 = A275975. With initial 0 and digits 2*a(n), it is ternary expansion .02002222 = A160386. These and in general g(1/b) for any integer b>=2 are among forms which Kempner showed are transcendental. - Kevin Ryde, Sep 07 2019

Crossrefs

Cf. A030301. Partial sums give A079947.
Characteristic function of A053738.

Programs

  • Maple
    f0 := n->[seq(0,i=1..2^n)]; f1 := n->[seq(1,i=1..2^n)]; s := []; for i from 0 to 4 do s := [op(s), op(f1(2*i)), op(f0(2*i+1))]; od: A030300 := s;
  • Mathematica
    nMax = 6; Table[1 - Mod[n, 2], {n, 0, nMax}, {2^n}] // Flatten (* Jean-François Alcover, Oct 20 2016 *)
  • PARI
    a(n) = if(n, !(logint(n,2)%2)); /* Kevin Ryde, Aug 02 2019 */
    
  • Python
    def A030300(n): return n.bit_length()&1 # Chai Wah Wu, Jan 30 2023

Formula

a(n) = A065359(n) + A083905(n).
a(n) = (1/2)*(1+(-1)^floor(log_2(n))). - Benoit Cloitre, Feb 22 2003
G.f.: 1/(1-x) * Sum_{k>=0} (-1)^k*x^2^k. - Ralf Stephan, Jul 12 2003
a(n) = 1 - a(floor(n/2)). - Vladeta Jovovic, Aug 04 2003
a(n) = A115253(2n, n) mod 2. - Paul Barry, Jan 18 2006
a(n) = 1 - A030301(n). - Antti Karttunen, Oct 10 2017