login
A286546
a(n) = A006068(n) - n.
3
0, 0, 1, -1, 3, 1, -2, -2, 7, 5, 2, 2, -4, -4, -3, -5, 15, 13, 10, 10, 4, 4, 5, 3, -8, -8, -7, -9, -5, -7, -10, -10, 31, 29, 26, 26, 20, 20, 21, 19, 8, 8, 9, 7, 11, 9, 6, 6, -16, -16, -15, -17, -13, -15, -18, -18, -9, -11, -14, -14, -20, -20, -19, -21, 63, 61, 58, 58, 52, 52, 53, 51, 40, 40, 41, 39, 43, 41, 38, 38
OFFSET
0,5
FORMULA
a(n) = A006068(n) - n.
a(n) = -A286548(A006068(n)). - Antti Karttunen, Oct 02 2017
PROG
(Scheme) (define (A286546 n) (- (A006068 n) n))
(Python)
def A286546(n):
k, m = n, n>>1
while m > 0:
k ^= m
m >>= 1
return k-n # Chai Wah Wu, Jun 30 2022
CROSSREFS
KEYWORD
sign,base
AUTHOR
Antti Karttunen, May 18 2017
STATUS
approved