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.

A027082 Irregular triangular array: T(n,0) = 1 for n >= 1; T(n,1) = T(n,2) = 1 for n >= 1; T(n,k) = T(n-1,k-3) + T(n-1,k-2) + T(n-1,k-1) for 3 <= k <= 2n-1 and n >= 2; and T(n,2n) = T(n-1,2n-3) + T(n-1,2n-2) for n >= 2.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 1, 3, 5, 6, 5, 1, 1, 1, 3, 5, 9, 14, 16, 11, 1, 1, 1, 3, 5, 9, 17, 28, 39, 41, 27, 1, 1, 1, 3, 5, 9, 17, 31, 54, 84, 108, 107, 68, 1, 1, 1, 3, 5, 9, 17, 31, 57, 102, 169, 246, 299, 283, 175, 1, 1, 1, 3, 5, 9, 17, 31, 57
Offset: 0

Views

Author

Keywords

Examples

			The first 6 rows:
1
1 .. 1 .. 1
1 .. 1 .. 1 .. 3 .. 2
1 .. 1 .. 1 .. 3 .. 5 .. 6 .. 5
1 .. 1 .. 1 .. 3 .. 5 .. 9 .. 14 .. 16 .. 11
1 .. 1 .. 1 .. 3 .. 5 .. 9 .. 17 .. 28 .. 39 .. 41 .. 27
		

Programs

  • Maple
    A027082 := proc(n,k)
        option remember;
        if k < 0 or k > 2*n then
            0;
        elif k <=2 then
            1;
        elif k  = 2*n then
            procname(n-1,k-3)+procname(n-1,k-2) ;
        else
            procname(n-1,k-3)+procname(n-1,k-2)+procname(n-1,k-1) ;
        end if;
    end proc:
    seq(seq(A027082(n,k),k=0..2*n),n=0..10) ; # R. J. Mathar, Jun 24 2020
  • Mathematica
    t[n_, 0] := 1; t[n_, 1] := 1; t[n_, 2] := 1; t[n_, k_] := t[n, k] = If[k < 2 n, t[n - 1, k - 3] + t[n - 1, k - 2] + t[n - 1, k - 1], t[n - 1, 2 n - 3] + t[n - 1, 2 n - 2]]; u = Table[t[n, k], {n, 0, 10}, {k, 0, 2 n}]; v = Flatten[u]  (* A027082 *)

Extensions

Corrected and edited by Clark Kimberling, Aug 06 2014
Offset corrected to 0 and b-file recomputed by R. J. Mathar, Jun 24 2020