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 A379451 #11 Dec 23 2024 22:05:59 %S A379451 2,10,162,6278,430906,46032666,7029940154,1453778429782, %T A379451 390651831405906,132345369222827306,55150093300481888770, %U A379451 27727437337790844360198,16545310955942988999292586,11561068480810074519638819626,9349537740123803513263001013354,8664632430514446774520557369434870 %N A379451 Number of ordered ways of writing 0 as Sum_{k=-n..n} e(k)*k, where e(k) is 0 or 1. %H A379451 Michael S. Branicky, <a href="/A379451/b379451.txt">Table of n, a(n) for n = 0..100</a> %e A379451 a(1) = 10 ways: {}, {0}, {-1, 1} (2 permutations), {-1, 0, 1} (6 permutations). %o A379451 (Python) %o A379451 from math import factorial %o A379451 from functools import cache %o A379451 @cache %o A379451 def b(i, s, c): %o A379451 if i == 0: return factorial(c) if s == 0 else 0 %o A379451 return b(i-1, s, c) + b(i-1, s+(i>>1)*(-1)**(i&1), c+1) %o A379451 def a(n): return b(2*n+1, 0, 0) %o A379451 print([a(n) for n in range(16)]) # _Michael S. Branicky_, Dec 23 2024 %Y A379451 Cf. A000980, A058377, A063865. %K A379451 nonn %O A379451 0,1 %A A379451 _Ilya Gutkovskiy_, Dec 23 2024 %E A379451 a(9) and beyond from _Michael S. Branicky_, Dec 23 2024