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.

A141604 Triangle, read by rows, T(n,k) = round(A006720(n)/(A006720(n-k)*A006720(k))).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 2, 3, 3, 2, 1, 1, 2, 4, 7, 4, 2, 1, 1, 3, 8, 12, 12, 8, 3, 1, 1, 3, 8, 20, 15, 20, 8, 3, 1, 1, 5, 14, 45, 52, 52, 45, 14, 5, 1, 1, 5, 26, 66, 109, 170, 109, 66, 26, 5, 1
Offset: 0

Views

Author

Roger L. Bagula and Gary W. Adamson, Aug 21 2008

Keywords

Comments

The round-function in the definition is round-to-nearest, not Mathematica's round-to-even. - R. J. Mathar, Jul 12 2012

Examples

			Triangle begins:
  1;
  1,   1;
  1,   1,   1;
  1,   1,   1,   1;
  1,   2,   2,   2,   1;
  1,   2,   3,   3,   2,   1;
  1,   2,   4,   7,   4,   2,   1;
  1,   3,   8,  12,  12,   8,   3,   1;
  1,   3,   8,  20,  15,  20,   8,   3,   1;
  1,   5,  14,  45,  52,  52,  45,  14,   5,   1;
  1,   5,  26,  66, 109, 170, 109,  66,  26,   5,   1;
		

Crossrefs

Cf. A006720.

Programs

  • Magma
    A006720:= [n le 4 select 1 else (Self(n-1)*Self(n-3)+Self(n-2)^2)/Self(n-4): n in [1..30]];
    A141604:= func< n,k | Round(A006720[n+1]/(A006720[k+1]*A006720[n-k+1])) >;
    [A141604(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Sep 21 2024
    
  • Maple
    A141604 := proc(n,m)
            round(A006720(n)/A006720(n-m)/A006720(m)) ;
    end proc:
    seq(seq(A141604(n,k),k=0..n),n=0..12) ; # R. J. Mathar, Jul 12 2012
  • Mathematica
    f[n_]:= f[n]= If[n<4, 1, (f[n-1]*f[n-3] +f[n-2]^2)/f[n-4]]; (* A006720 *)
    A141604[n_, k_]:= Round[f[n]/(f[k]*f[n-k])];
    Table[A141604[n,k], {n,0,12}, {k,0,n}]//Flatten (* modified by G. C. Greubel, Sep 21 2024 *)
  • SageMath
    def f(n): # f = A006720
        if n<4: return 1
        else: return (f(n-1)*f(n-3) +f(n-2)^2)/f(n-4)
    def A141604(n,k): return round(f(n)/(f(k)*f(n-k)))
    flatten([[A141604(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Sep 21 2024