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”).

A268679
a(n) = A268389(A001969(1+n)); A268389 without its zero terms.
4
1, 2, 1, 1, 2, 1, 3, 4, 1, 2, 1, 1, 2, 1, 3, 1, 4, 1, 2, 2, 1, 3, 1, 1, 5, 1, 2, 2, 1, 3, 1, 2, 1, 4, 1, 1, 3, 1, 2, 2, 1, 6, 1, 1, 3, 1, 2, 1, 2, 1, 5, 3, 1, 2, 1, 1, 2, 1, 4, 3, 1, 2, 1, 1, 2, 1, 3, 4, 1, 2, 1, 1, 2, 1, 3, 5, 1, 2, 1, 2, 1, 3, 1, 1, 6, 1, 2, 2, 1, 3, 1, 1, 4, 1, 2, 1, 3, 1, 2, 2, 1, 5, 1, 1, 3, 1, 2, 2, 1, 4, 1, 3, 1, 2, 1, 1, 2, 1, 4, 3
OFFSET
1,2
LINKS
FORMULA
a(n) = A268389(A001969(1+n)).
MATHEMATICA
f[n_] := Which[n == 1, 0, OddQ@ #, 0, EvenQ@ #, 1 + f[#/2]] &@ Fold[BitXor, n, Quotient[n, 2^Range[BitLength@ n - 1]]];
Array[f, {240}] /. 0 -> Nothing (* Michael De Vlieger, Feb 12 2016, after Jan Mangaldan at A006068 *)
PROG
(Scheme) (define (A268679 n) (A268389 (A001969 (+ 1 n))))
CROSSREFS
Cf. A268678 (partial sums), A268680.
Sequence in context: A104524 A233322 A233324 * A128807 A309035 A071628
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Feb 10 2016
STATUS
approved