OFFSET
1,2
COMMENTS
This is a fractal sequence (see scatterplot for 2^k<=n<=2^(k+1) and various k).
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..16384
MAPLE
b:= proc(n) option remember;
`if`(n=1, 1, add(b(k)*(-1)^floor(n/k), k=1..n-1))
end:
a:= proc(n) option remember; b(n) +`if`(n=1, 0, a(n-1)) end:
seq(a(n), n=1..100); # Alois P. Heinz, Sep 12 2011
MATHEMATICA
b[1] = 1;
b[n_] := b[n] = Sum[b[k] (-1)^Floor[n/k], {k, 1, n-1}];
Array[b, 100] // Accumulate (* Jean-François Alcover, Nov 12 2020 *)
CROSSREFS
KEYWORD
sign,look
AUTHOR
Benoit Cloitre, Sep 09 2011
STATUS
approved