cp's OEIS Frontend

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.

A379451 Number of ordered ways of writing 0 as Sum_{k=-n..n} e(k)*k, where e(k) is 0 or 1.

Original entry on oeis.org

2, 10, 162, 6278, 430906, 46032666, 7029940154, 1453778429782, 390651831405906, 132345369222827306, 55150093300481888770, 27727437337790844360198, 16545310955942988999292586, 11561068480810074519638819626, 9349537740123803513263001013354, 8664632430514446774520557369434870
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 23 2024

Keywords

Examples

			a(1) = 10 ways: {}, {0}, {-1, 1} (2 permutations), {-1, 0, 1} (6 permutations).
		

Crossrefs

Programs

  • Python
    from math import factorial
    from functools import cache
    @cache
    def b(i, s, c):
        if i == 0: return factorial(c) if s == 0 else 0
        return b(i-1, s, c) + b(i-1, s+(i>>1)*(-1)**(i&1), c+1)
    def a(n): return b(2*n+1, 0, 0)
    print([a(n) for n in range(16)]) # Michael S. Branicky, Dec 23 2024

Extensions

a(9) and beyond from Michael S. Branicky, Dec 23 2024