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 A058377 #52 Feb 03 2024 10:15:37 %S A058377 0,0,1,1,0,0,4,7,0,0,35,62,0,0,361,657,0,0,4110,7636,0,0,49910,93846, %T A058377 0,0,632602,1199892,0,0,8273610,15796439,0,0,110826888,212681976,0,0, %U A058377 1512776590,2915017360,0,0,20965992017,40536016030,0,0,294245741167 %N A058377 Number of solutions to 1 +- 2 +- 3 +- ... +- n = 0. %C A058377 Consider the set { 1,2,3,...,n }. Sequence gives number of ways this set can be partitioned into 2 subsets with equal sums. For example, when n = 7, { 1,2,3,4,5,6,7} can be partitioned in 4 ways: {1,6,7} {2,3,4,5}; {2,5,7} {1,3,4,6}; {3,4,7} {1,2,5,6} and {1,2,4,7} {3,5,6}. - sorin (yamba_ro(AT)yahoo.com), Mar 24 2007 %C A058377 The "equal sums" of Sorin's comment are the positive terms of A074378 (Even triangular numbers halved). In the current sequence a(n) <> 0 iff n is the positive index (A014601) of an even triangular number (A014494). - _Rick L. Shepherd_, Feb 09 2010 %C A058377 a(n) is the number of partitions of n(n-3)/4 into distinct parts not exceeding n-1. - _Alon Amit_, Oct 18 2017 %C A058377 a(n) is the coefficient of x^(n*(n+1)/4-1) of Product_{k=2..n} (1+x^k). - _Jianing Song_, Nov 19 2021 %H A058377 Alois P. Heinz and Ray Chandler, <a href="/A058377/b058377.txt">Table of n, a(n) for n = 1..3342</a> (terms < 10^1000, first 1000 terms from Alois P. Heinz) %H A058377 Larry Glasser, <a href="/A058377/a058377.pdf">A formula for A058377</a>, Jul 29 2019 %F A058377 a(n) is half the coefficient of q^0 in product('(q^(-k)+q^k)', 'k'=1..n) for n >= 1. - _Floor van Lamoen_, Oct 10 2005 %F A058377 a(4n+1) = a(4n+2) = 0. - _Michael Somos_, Apr 15 2007 %F A058377 a(n) = [x^n] Product_{k=1..n-1} (x^k + 1/x^k). - _Ilya Gutkovskiy_, Feb 01 2024 %e A058377 1+2-3=0, so a(3)=1; %e A058377 1-2-3+4=0, so a(4)=1; %e A058377 1+2-3+4-5-6+7=0, 1+2-3-4+5+6-7=0, 1-2+3+4-5+6-7=0, 1-2-3-4-5+6+7=0, so a(7)=4. %p A058377 b:= proc(n, i) option remember; local m; m:= i*(i+1)/2; %p A058377 `if`(n>m, 0, `if`(n=m, 1, b(abs(n-i), i-1) +b(n+i, i-1))) %p A058377 end: %p A058377 a:= n-> `if`(irem(n-1, 4)<2, 0, b(n, n-1)): %p A058377 seq(a(n), n=1..60); # _Alois P. Heinz_, Oct 30 2011 %t A058377 f[n_, s_] := f[n, s] = Which[n == 0, If[s == 0, 1, 0], Abs[s] > (n*(n + 1))/2, 0, True, f[n - 1, s - n] + f[n - 1, s + n]]; Table[ f[n, 0]/2, {n, 1, 50}] %o A058377 (PARI) list(n) = my(poly=vector(n), v=vector(n)); poly[1]=1; for(k=2, n, poly[k]=poly[k-1]*(1+'x^k)); for(k=1, n, if(k%4==1||k%4==2, v[k]=0, v[k]=polcoeff(poly[k], k*(k+1)/4-1))); v \\ _Jianing Song_, Nov 19 2021 %Y A058377 Cf. A000217, A014601, A014494, A025591, A063865, A063866, A063867, A069918, A074378, A111133, A161943, A348639. %Y A058377 Column k=2 of A275714. %K A058377 nonn %O A058377 1,7 %A A058377 _Naohiro Nomoto_, Dec 19 2000 %E A058377 More terms from _Sascha Kurz_, Mar 25 2002 %E A058377 Edited and extended by _Robert G. Wilson v_, Oct 24 2002