OFFSET
1,3
COMMENTS
Apparently a(2*n + 1) = A053656(2*n + 1) for n >= 0. - Georg Fischer, Mar 26 2019
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..3334 (terms 1..1000 from Alois P. Heinz)
FORMULA
EXAMPLE
Solutions for n = 7:
--------------------------
1 +2 +3 +4 +5 +6 +7 = 28.
1 +2 +3 +4 +5 +6 -7 = 14.
1 +2 -3 +4 -5 -6 +7 = 0.
1 +2 -3 +4 -5 -6 -7 = -14.
1 +2 -3 -4 +5 +6 +7 = 14.
1 +2 -3 -4 +5 +6 -7 = 0.
1 -2 +3 +4 -5 +6 +7 = 14.
1 -2 +3 +4 -5 +6 -7 = 0.
1 -2 -3 -4 -5 +6 +7 = 0.
1 -2 -3 -4 -5 +6 -7 = -14.
MAPLE
b:= proc(n, i, m) option remember; `if`(i=0, `if`(n=0, 1, 0),
add(b(irem(n+j, m), i-1, m), j=[i, m-i]))
end:
a:= n-> b(0, n-1, n):
seq(a(n), n=1..60); # Alois P. Heinz, Mar 01 2018
MATHEMATICA
b[n_, i_, m_] := b[n, i, m] = If[i == 0, If[n == 0, 1, 0], Sum[b[Mod[n + j, m], i - 1, m], {j, {i, m - i}}]];
a[n_] := b[0, n - 1, n];
Array[a, 60] (* Jean-François Alcover, Apr 29 2020, after Alois P. Heinz *)
PROG
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Feb 28 2018
STATUS
approved