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.

A095767 a(n) = valuation(A004001(n),2).

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, Jun 05 2004

Keywords

Crossrefs

Cf. A095768.

Programs

  • Mathematica
    a[1] = a[2] = 1; a[n_] := a[n] = a[a[n - 1]] + a[n - a[n - 1]]; f[n_] := Length[ NestWhileList[ #/2 &, n, IntegerQ[ # ] &]] - 2; Table[ f[ a[n]], {n, 105}] (* Robert G. Wilson v, Jun 11 2004 *)

Formula

Partial formula: a(2^(n+1) - n + i) = n for 0<=i<=n.