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.

A359312 a(1) = 1; for n >= 1, a(2*n) = A000005(a(n)), a(2*n + 1) = A000005(a(n)) + 1.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 2, 3, 1, 2, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 1, 2, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 1, 2, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2
Offset: 1

Views

Author

Ctibor O. Zizka, Dec 25 2022

Keywords

Examples

			a(1) = 1;
a(2) = A000005(a(1)) = 1;
a(3) = A000005(a(1)) + 1 = 2;
a(4) = A000005(a(2)) = 1;
a(5) = A000005(a(2)) + 1 = 2;
and so on.
		

Crossrefs

Programs

  • Mathematica
    a[1] = 1; a[n_] := a[n] = If[EvenQ[n], DivisorSigma[0, a[n/2]], DivisorSigma[0, a[(n - 1)/2]] + 1]; Array[a, 100] (* Amiram Eldar, Dec 25 2022 *)

Formula

Sum_{i = 2^k..2^(k + 1) - 1} a(i) = 5*2^(k - 1) - 2, for k >= 1.
a(2^k) = 1.