login
A268395
Partial sums of A268389.
9
0, 0, 0, 1, 1, 3, 4, 4, 4, 5, 7, 7, 8, 8, 8, 11, 11, 15, 16, 16, 18, 18, 18, 19, 20, 20, 20, 22, 22, 23, 26, 26, 26, 27, 31, 31, 32, 32, 32, 34, 36, 36, 36, 37, 37, 40, 41, 41, 42, 42, 42, 47, 47, 48, 50, 50, 50, 52, 53, 53, 56, 56, 56, 57, 57, 59, 60, 60, 64, 64, 64, 65, 66, 66, 66, 69, 69, 70, 72, 72, 74, 74, 74, 75, 75, 81
OFFSET
0,6
LINKS
FORMULA
a(0) = 0, for n >= 1, a(n) = A268389(n) + a(n-1).
Other identities. For all n >= 0:
a(n) = A268389(A048631(n)).
a(n) = n - A268672(n).
MATHEMATICA
f[n_] := Which[n == 1, 0, OddQ@ #, 0, EvenQ@ #, 1 + f[#/2]] &@ Fold[BitXor, n, Quotient[n, 2^Range[BitLength@ n - 1]]]; Accumulate@ Array[f, {85}] (* Michael De Vlieger, Feb 12 2016, after Jan Mangaldan at A006068 *)
PROG
(Scheme, with memoization-macro definec)
(definec (A268395 n) (if (zero? n) n (+ (A268389 n) (A268395 (- n 1)))))
CROSSREFS
Cf. A268678 (with duplicates removed), A268677 (numbers that do not occur here).
Cf. also A054861.
Sequence in context: A069812 A179842 A259052 * A304032 A022484 A361497
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 10 2016
STATUS
approved