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.

A160999 Row sums of A027052.

Original entry on oeis.org

1, 2, 5, 12, 31, 84, 233, 656, 1865, 5338, 15355, 44342, 128455, 373100, 1086087, 3167634, 9254009, 27074666, 79316491, 232633206, 683026535, 2007327660, 5904415195, 17381265934, 51203990457, 150945252394, 445252685313
Offset: 0

Views

Author

R. J. Mathar, Jun 01 2009

Keywords

Examples

			a(2) = 1+0+1+2+1 = 5.
a(3) = 1+0+1+2+3+4+1 = 12.
		

Programs

  • Maple
    A027052 := proc(n,k) option remember; if k =0 or k = 2*n then 1; elif k = 1 then 0; elif k =2 then 1; else procname(n-1,k-3)+procname(n-1,k-2)+procname(n-1,k-1) ; fi; end:
    A160999 := proc(n) add( A027052(n,k),k=0..2*n) ; end: seq(A160999(n),n=0..30) ;
  • Mathematica
    T[n_, k_]:= T[n, k]= If[k==0 || k==2 || k==2*n, 1, If[k==1, 0, Sum[T[n-1, k-j], {j, 3}]]]; Table[Sum[T[n, k], {k,0,2*n}], {n,0,30}] (* G. C. Greubel, Nov 06 2019 *)
  • Sage
    @CachedFunction
    def T(n, k):
        if (k==0 or k==2 or k==2*n): return 1
        elif (k==1): return 0
        else: return sum(T(n-1, k-j) for j in (1..3))
    [sum(T(n, k) for k in (0..2*n)) for n in (0..30)] # G. C. Greubel, Nov 06 2019

Formula

a(n) = Sum_{k=0..2*n} A027052(n,k).
Conjecture: (-n+2)*a(n) +(6*n-11)*a(n-1) +(-7*n+1)*a(n-2) +2*(-4*n+27)*a(n-3) +(5*n-28)*a(n-4) +(2*n-3)*a(n-5) +3*(n-5)*a(n-6)=0. - R. J. Mathar, May 26 2016