login
A317840
Difference between Stern's Diatomic sequence (A002487) and its Möbius transform (A317839).
4
0, 1, 1, 1, 1, 2, 1, 1, 2, 3, 1, 2, 1, 3, 4, 1, 1, 4, 1, 3, 4, 5, 1, 2, 3, 5, 4, 3, 1, 4, 1, 1, 6, 5, 5, 4, 1, 7, 6, 3, 1, 8, 1, 5, 6, 7, 1, 2, 3, 7, 6, 5, 1, 8, 7, 3, 8, 7, 1, 4, 1, 5, 10, 1, 7, 6, 1, 5, 8, 9, 1, 4, 1, 11, 8, 7, 7, 10, 1, 3, 8, 11, 1, 8, 7, 13, 8, 5, 1, 12, 7, 7, 6, 9, 9, 2, 1, 9, 8, 7, 1, 12, 1, 5, 14
OFFSET
1,6
FORMULA
a(n) = -Sum_{d|n, d<n} A008683(n/d)*A002487(d).
a(n) = A002487(n) - A317839(n).
PROG
(PARI)
A002487(n) = { my(a=1, b=0); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); (b); }; \\ From A002487
A317840(n) = -sumdiv(n, d, (d<n)*moebius(n/d)*A002487(d));
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Aug 09 2018
STATUS
approved