OFFSET
1,3
COMMENTS
The composer Per Nørgård's name is also written in the OEIS as Per Noergaard.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..16384
MATHEMATICA
b[0] = 0;
b[n_?EvenQ] := b[n] = -b[n/2];
b[n_] := b[n] = b[(n - 1)/2] + 1;
a[n_] := a[n] = If[n == 1, 1, -Sum[b[n/d] a[d], {d, Most@ Divisors[n]}]];
Array[a, 100] (* Jean-François Alcover, Feb 16 2020 *)
PROG
(PARI)
up_to = 65537;
A004718list(up_to) = { my(v=vector(up_to)); v[1]=1; v[2]=-1; for(n=3, up_to, v[n] = if(n%2, v[n>>1]+1, -v[n/2])); (v); }; \\ After code in A004718.
DirInverseCorrect(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = (-u[1])*sumdiv(n, d, if(d<n, v[n/d]*u[d], 0))); (u) }; \\ Compute the Dirichlet inverse of the sequence given in input vector v (correctly!).
v323886 = DirInverseCorrect(A004718list(up_to));
A323886(n) = v323886[n];
CROSSREFS
KEYWORD
sign
AUTHOR
Antti Karttunen, Feb 08 2019
STATUS
approved