|
|
A178411
|
|
a(1)=2, a(2)=1; for n>=3, a(n) is defined by recursion: Sum_{d|n}((-1)^(n/d))*a(d) = -1.
|
|
2
|
|
|
2, 1, -1, 4, -1, 1, -1, 8, 0, 1, -1, 0, -1, 1, 1, 16, -1, 0, -1, 0, 1, 1, -1, 0, 0, 1, 0, 0, -1, -1, -1, 32, 1, 1, 1, 0, -1, 1, 1, 0, -1, -1, -1, 0, 0, 1, -1, 0, 0, 0, 1, 0, -1, 0, 1, 0, 1, 1, -1, 0, -1, 1, 0, 64, 1, -1, -1, 0, 1, -1, -1, 0, -1, 1, 0, 0, 1, -1, -1, 0, 0, 1, -1, 0, 1, 1, 1, 0, -1, 0, 1, 0, 1, 1, 1, 0, -1, 0, 0, 0, -1, -1, -1, 0, -1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
A generalization of the sequence: Let a(1) = m+1, a(2) = 2*m-1, and for n>=3, a(n) is defined by recursion: Sum{d|n}((-1)^(n/d))*a(d) = -m. Then a(n) = mu(n), if n is not power of 2; otherwise, for n>=4, a(n) = m*n.
|
|
LINKS
|
|
|
FORMULA
|
a(1) = 2, a(2) = 1, and for n > 2, if A209229(n) = 1 [n is a power of 2] then a(n) = n, otherwise a(n) = A008683(n), where A008683(n) is Moebius mu function.
a(n) = 1 + Sum_{d|n, d<n} ((-1)^(n/d))*a(d). [Description converted from an implicit to an explicit recurrence] - Antti Karttunen, Sep 21 2017
|
|
MATHEMATICA
|
a[1] = 2; a[2] = 1; a[n_] := a[n] = If[IntegerQ@ Log2@ n, # + 1, MoebiusMu[n]] &@ Sum[((-1)^(n/d)) a[d], {d, Most@ Divisors@ n}]; Array[a, 105] (* Michael De Vlieger, Sep 21 2017 *)
|
|
PROG
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|