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.

A336361 Number of iterations of A000593 (sum of divisors of odd part of n) needed to reach a power of 2, or -1 if never reached.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jul 30 2020

Keywords

Comments

Also, for n > 1, one less than the number of iterations of A000593 to reach 1.
If there exists any hypothetical odd perfect numbers w, then the iteration will get stuck into a fixed point after encountering them, and we will have a(w) = a(2^k * w) = -1 by the escape clause.

Crossrefs

Cf. A054784 (positions of 0's and 1's in this sequence).

Programs

  • PARI
    A336361(n) = if(!bitand(n,n-1),0,1+A336361(sigma(n>>valuation(n,2))));

Formula

If A209229(n) = 1 [when n is a power of 2], a(n) = 0, otherwise a(n) = 1+a(A000593(n)).
a(n) = a(2n) = a(A000265(n)).