OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..1000 (first 200 terms from Seiichi Manyama)
EXAMPLE
Solutions for n = 7:
----------------------------
1 +3 +5 +7 +9 +11 +13 = 49.
1 +3 +5 -7 +9 +11 +13 = 35.
1 +3 -5 +7 -9 +11 +13 = 21.
1 +3 -5 -7 -9 +11 +13 = 7.
1 -3 +5 +7 +9 -11 +13 = 21.
1 -3 +5 -7 +9 -11 +13 = 7.
1 -3 -5 +7 +9 +11 -13 = 7.
1 -3 -5 +7 -9 -11 +13 = -7.
1 -3 -5 -7 +9 +11 -13 = -7.
1 -3 -5 -7 -9 -11 +13 = -21.
MAPLE
b:= proc(n, i, m) option remember; `if`(i<1, `if`(n=0, 1, 0),
add(b(irem(n+j, m), i-2, m), j=[i, m-i]))
end:
a:= n-> b(n-1, 2*n-3, n):
seq(a(n), n=1..40); # Alois P. Heinz, Mar 01 2018
MATHEMATICA
Table[With[{s = Range[1, (2 n - 1), 2]}, Count[Map[Total[s #] &, Take[Tuples[{-1, 1}, Length@ s], -2^(n - 1)]], _?(Divisible[#, n] &)]], {n, 22}] (* Michael De Vlieger, Mar 01 2018 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Feb 28 2018
STATUS
approved