OFFSET
0,6
COMMENTS
Suggested by A190173.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000
MAPLE
b:= proc(n) option remember; local r;
`if`(n=0, 1, `if`(irem(n, 2, 'r')=0, b(r), b(r)*(-1)^r))
end:
s:= proc(j) option remember; `if`(j<2, 0, s(j-1)+b(j-1)) end:
a:= proc(n) option remember; `if`(n<2, 0, a(n-1)+b(n)*s(n)) end:
seq(a(n), n=0..100); # Alois P. Heinz, Jun 23 2012
MATHEMATICA
b[0] = 1; b[1] = 1; b[n_?EvenQ] := b[n] = b[n/2]; b[n_?OddQ] := b[n] = (-1)^((n-1)/2)*b[(n-1)/2]; a[n_] := Sum[b[i]*b[j], {i, 1, n-1}, {j, i+1, n}]; Table[a[n], {n, 0, 72}] (* Jean-François Alcover, Nov 27 2014 *)
PROG
(Python)
def A213786(n): return sum((-1 if (i&(i>>1)).bit_count()&1 else 1)*sum(-1 if (j&(j>>1)).bit_count()&1 else 1 for j in range(i+1, n+1)) for i in range(1, n+1)) # Chai Wah Wu, Feb 12 2023
CROSSREFS
KEYWORD
sign
AUTHOR
N. J. A. Sloane, Jun 20 2012
STATUS
approved