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.

A112248 a(n) = n mod floor(log_2(n)).

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Aug 30 2005

Keywords

Comments

a(A112249(n)) = 0, a(A112250(n)) > 0, a(A112251(n)) = 1.

Crossrefs

Programs

  • Maple
    seq(seq(n mod d, n=2^d .. 2^(d+1)-1),d=1..8); # Robert Israel, Aug 27 2020
  • Mathematica
    Table[Mod[n, Floor @ Log2[n]], {n, 2, 100}] (* Amiram Eldar, Aug 27 2020 *)
  • PARI
    a(n) = n % logint(n, 2); \\ Michel Marcus, Aug 27 2020

Extensions

Name edited by Michel Marcus, Aug 27 2020