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.

A026537 a(n) = T(n,n), T given by A026536. Also a(n) = number of integer strings s(0), ..., s(n), counted by T, such that s(n)=0.

Original entry on oeis.org

1, 0, 2, 2, 8, 12, 38, 66, 196, 360, 1052, 1980, 5774, 11004, 32146, 61726, 180772, 348912, 1024256, 1984608, 5837908, 11346280, 33433996, 65143716, 192239854, 375351288, 1109049320, 2169299288, 6416509142, 12569973108
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    T[n_, k_]:= T[n, k]= If[k==0 || k==2*n, 1, If[k==1 || k==2*n-1, Floor[n/2], If[EvenQ[n], T[n-1, k-2] + T[n-1, k-1] + T[n-1, k], T[n-1, k-2] + T[n-1, k]] ]]; Table[T[n, n], {n, 0, 35}] (* G. C. Greubel, Apr 10 2022 *)
  • SageMath
    @cached_function
    def T(n, k): # A026536
        if k < 0 or n < 0: return 0
        elif k == 0 or k == 2*n: return 1
        elif k == 1 or k == 2*n-1: return n//2
        elif n % 2 == 1: return T(n-1, k-2) + T(n-1, k)
        return T(n-1, k-2) + T(n-1, k-1) + T(n-1, k)
    def A026537(n): return T(n,n)
    [A026537(n) for n in (0..35)] # G. C. Greubel, Apr 10 2022

Formula

a(n) = A026536(n, n).
a(n) = 2 * A026521(n-1).