login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A359312
a(1) = 1; for n >= 1, a(2*n) = A000005(a(n)), a(2*n + 1) = A000005(a(n)) + 1.
0
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,3
FORMULA
Sum_{i = 2^k..2^(k + 1) - 1} a(i) = 5*2^(k - 1) - 2, for k >= 1.
a(2^k) = 1.
EXAMPLE
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.
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 *)
CROSSREFS
Sequence in context: A144016 A376109 A354582 * A179868 A104232 A072086
KEYWORD
nonn
AUTHOR
Ctibor O. Zizka, Dec 25 2022
STATUS
approved