login
A268671
a(n) = (A268670(n)+1) / 2.
7
1, 2, 1, 4, 1, 2, 3, 8, 3, 2, 7, 4, 5, 6, 1, 16, 1, 6, 15, 4, 13, 14, 5, 8, 9, 10, 3, 12, 7, 2, 11, 32, 11, 2, 31, 12, 29, 30, 7, 8, 25, 26, 9, 28, 3, 10, 27, 16, 17, 18, 1, 20, 15, 6, 19, 24, 5, 14, 23, 4, 21, 22, 13, 64, 13, 22, 63, 4, 61, 62, 21, 24, 57, 58, 5, 60, 23, 14, 59, 16, 49, 50, 17, 52, 1
OFFSET
1,2
LINKS
FORMULA
a(n) = (A268670(n)+1) / 2.
MATHEMATICA
f[n_] := Fold[BitXor, n, Quotient[n, 2^Range[BitLength@ n - 1]]]; g[n_] := If[OddQ@ #, n, g[#/2]] &@ f[n]; Table[(f@ g@ n + 1)/2, {n, 85}] (* Michael De Vlieger, Feb 12 2016, after Jan Mangaldan at A006068 *)
PROG
(Scheme) (define (A268671 n) (/ (+ 1 (A268670 n)) 2))
CROSSREFS
Cf. A001317 (positions of ones).
Sequence in context: A334890 A171174 A171173 * A163618 A341691 A275392
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Feb 10 2016
STATUS
approved