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.

A201219 a(1) = 0; for n>1, a(n) = 1 if n is a power of 2, otherwise a(n) = 2.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Nov 28 2011

Keywords

Comments

This solves the Emissary puzzle.

Crossrefs

Programs

  • Mathematica
    Join[{0},Table[If[IntegerQ[Log2[n]],1,2],{n,2,200}]] (* Harvey P. Dale, Dec 03 2021 *)

Formula

a(1) = 0, for n > 1, a(n) = 2 - A209229(n). - Antti Karttunen, Nov 19 2017