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.

A162515 Triangle of coefficients of polynomials defined by Binet form: P(n,x) = (U^n - L^n)/d, where U = (x + d)/2, L = (x - d)/2, d = sqrt(x^2 + 4).

Original entry on oeis.org

0, 1, 1, 0, 1, 0, 1, 1, 0, 2, 0, 1, 0, 3, 0, 1, 1, 0, 4, 0, 3, 0, 1, 0, 5, 0, 6, 0, 1, 1, 0, 6, 0, 10, 0, 4, 0, 1, 0, 7, 0, 15, 0, 10, 0, 1, 1, 0, 8, 0, 21, 0, 20, 0, 5, 0, 1, 0, 9, 0, 28, 0, 35, 0, 15, 0, 1, 1, 0, 10, 0, 36, 0, 56, 0, 35, 0, 6, 0, 1, 0, 11, 0, 45, 0, 84, 0, 70, 0, 21, 0, 1
Offset: 0

Views

Author

Clark Kimberling, Jul 05 2009

Keywords

Comments

Row sums 0,1,1,2,3,5,... are the Fibonacci numbers, A000045.
Note that the coefficients are given in decreasing order. - M. F. Hasler, Dec 07 2011
Essentially a mirror image of A168561. - Philippe Deléham, Dec 08 2013

Examples

			Polynomial expansion:
  0;
  1;
  x;
  x^2 + 1;
  x^3 + 2*x;
  x^4 + 3*x^2 + 1;
First rows:
  0;
  1;
  1, 0;
  1, 0, 1;
  1, 0, 2, 0;
  1, 0, 3, 0, 1;
  1, 0, 4, 0, 3, 0;
Row 6 matches P(6,x)=x^5 + 4*x^3 + 3*x.
		

Crossrefs

Programs

  • GAP
    T:= function(n,k)
        if (k mod 2)=0 then return Binomial(n- k/2, k/2);
        else return 0;
        fi; end;
    Concatenation([0], Flat(List([0..15], n-> List([0..n], k-> T(n,k) ))) ); # G. C. Greubel, Jan 01 2020
  • Magma
    function T(n,k)
      if (k mod 2) eq 0 then return Round( Gamma(n-k/2+1)/(Gamma(k/2+1)*Gamma(n-k+1)));
      else return 0;
      end if; return T; end function;
    [0] cat [T(n,k): k in [0..n], n in [0..15]]; // G. C. Greubel, Jan 01 2020
    
  • Maple
    0, seq(seq(`if`(`mod`(k,2)=0, binomial(n-k/2, k/2), 0), k = 0..n), n = 0..15); # G. C. Greubel, Jan 01 2020
  • Mathematica
    Join[{0}, Table[If[EvenQ[k], Binomial[n-k/2, k/2], 0], {n,0,15}, {k,0,n} ]//Flatten] (* G. C. Greubel, Jan 01 2020 *)
  • PARI
    row(n,d=sqrt(1+x^2/4+O(x^n))) = Vec(if(n,Pol(((x/2+d)^n-(x/2-d)^n)/d)>>1)) \\ M. F. Hasler, Dec 07 2011, edited Jul 05 2021
    
  • Sage
    @CachedFunction
    def T(n, k):
        if (k%2==0): return binomial(n-k/2, k/2)
        else: return 0
    [0]+flatten([[T(n, k) for k in (0..n)] for n in (0..15)]) # G. C. Greubel, Jan 01 2020
    

Formula

P(n,x) = x*P(n-1, x) + P(n-2, x), where P(0,x)=0 and P(1,x)=1.
T(n,k) = T(n-1, k) + T(n-2, k-2) for n>=2. - Philippe Deléham, Dec 08 2013