This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A160492 #12 Dec 07 2019 12:18:26 %S A160492 1,6,45,560,9795,223524,6284089,210208560,8156750283,360297117070, %T A160492 17853149451841,980844453593160,59179098916735213,3890176308574524934, %U A160492 276750779199166606705,21185250061147839785120,1736385140876356212244563,151719500906542020597450498 %N A160492 a(n) = number of solutions to an equation x_1 + ... + x_j =0 with 1<=j<=n satisfying -n<=x_i<=n (1<=i<=j). %C A160492 The number of variables in the equation can be from 1 to n and each variable can have a value of -n to n. See A286928 for the case of exactly n variables. - _Andrew Howroyd_, May 16 2017 %F A160492 a(n) = Sum_{k=1..n} Sum_{i=0..floor(k/2)} (-1)^i*binomial(k*(n+1)-i*(2*n+1)-1, k-1)*binomial(k, i). - _Andrew Howroyd_, May 16 2017 %e A160492 From _Andrew Howroyd_, May 16 2017 (Start) %e A160492 Case n=3: %e A160492 1 variable: {0} is only solution. %e A160492 2 variables: {-3,3}, {-2,2}, {-1,1}, {0,0}, {1,-1}, {2,-2}, {3,-3}. %e A160492 3 variables: {-3 0 3}x6, {-3 1 2}x6, {-2 -1 3}x6, {-2 0 2}x6, %e A160492 {-2 1 1}x3, {-1 -1 2}x3, {-1 0 1}x6, {0 0 0}x1 %e A160492 In the above, {-3 0 3}x6 means that the values can be expanded to 6 solutions by considering different orderings. %e A160492 In total there are 1 + 7 + 37 = 45 solutions so a(3)=45. %e A160492 (End) %t A160492 zerocompositionswithzero[p_] := Module[{united = {}, i, zerosums = {}, count = 0}, For[i = 1, i <= p, i = i + 1, united = Union[united, Tuples[Table[x, {x, -p, p}], i]] ]; For[i = 1, i <= Length[united], i = i + 1, If[Sum[united[[i, j]], {j, 1, Length[united[[i]]]}] == 0, zerosums = Append[zerosums, united[[i]]]; count = count + 1;]; ]; Return[{count, zerosums}]; ]; %o A160492 (PARI) %o A160492 \\ nr compositions of r with max value m into exactly k parts. %o A160492 compositions(r,m,k)=sum(i=0,floor((r-k)/m),(-1)^i*binomial(r-1-i*m, k-1)*binomial(k, i)); %o A160492 a(n)=sum(v=1,n,compositions(v*(n+1),2*n+1,v)); \\ _Andrew Howroyd_, May 16 2017 %o A160492 (Python) %o A160492 from sympy import binomial %o A160492 def C(r, m, k): return sum([(-1)**i*binomial(r - 1 - i*m, k - 1)*binomial(k, i) for i in range(int((r - k)/m) + 1)]) %o A160492 def a(n): return sum([C(v*(n + 1), 2*n + 1, v) for v in range(1, n + 1)]) # _Indranil Ghosh_, May 16 2017, after the PARI program by _Andrew Howroyd_ %Y A160492 Cf. A286928. %K A160492 nonn %O A160492 1,2 %A A160492 _Srikanth K S_, May 15 2009 %E A160492 Name clarified and a(6)-a(18) from _Andrew Howroyd_, May 16 2017