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.

A326732 Number of iterations of A326731(x) starting at x = n to reach 0.

Original entry on oeis.org

0, 1, 1, 2, 1, 4, 2, 3, 1, 6, 4, 7, 2, 5, 3, 4, 1, 8, 6, 11, 4, 9, 7, 10, 2, 7, 5, 8, 3, 6, 4, 5, 1, 10, 8, 15, 6, 13, 11, 16, 4, 11, 9, 14, 7, 12, 10, 13, 2, 9, 7, 12, 5, 10, 8, 11, 3, 8, 6, 9, 4, 7, 5, 6, 1, 12, 10, 19, 8, 17, 15, 22, 6, 15, 13, 20, 11, 18, 16, 21, 4, 13, 11, 18, 9, 16, 14, 19, 7, 14, 12, 17, 10, 15, 13, 16, 2, 11, 9, 16, 7
Offset: 0

Views

Author

Max Alekseyev, Jul 22 2019

Keywords

Comments

The sequence is well-defined, see Problem 5 of IMO 2019.

Crossrefs

Programs

  • PARI
    A326732(n) = my(b=binary(n)); 2*sum(i=1, #b, i*b[i]) - vecsum(b)^2;

Formula

a(n) = 2*A230877(n) - A000120(n)^2.
a(n) = 1 iff n is a power of 2.