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.

Showing 1-3 of 3 results.

A084615 a(n) = sum of absolute values of coefficients of (1+x-3x^2)^n.

Original entry on oeis.org

1, 5, 23, 99, 401, 1525, 6345, 27331, 122083, 520805, 2117293, 8301441, 34517395, 147850771, 628707981, 2675100397, 10920387779, 43701876543, 180872758207, 769658883325, 3243501133481, 13617178197183, 56148348498199
Offset: 0

Views

Author

Paul D. Hanna, Jun 01 2003

Keywords

Crossrefs

Programs

  • Magma
    A084614:= func< n,k | (&+[Binomial(n, k-j)*Binomial(k-j, j)*(-3)^j: j in [0..k]]) >;
    [(&+[Abs(A084614(n,k)): k in [0..2*n]]): n in [0..50]]; // G. C. Greubel, Mar 25 2023
    
  • Mathematica
    Table[Total[Abs[CoefficientList[Expand[(1+x-3x^2)^n],x]]],{n,0,30}] (* Harvey P. Dale, Mar 26 2013 *)
  • PARI
    for(n=0,40,S=0; for(k=0,2*n,t=polcoeff((1+x-3*x^2)^n,k,x); S=S+abs(t)); print1(S","))
    
  • SageMath
    @CachedFunction
    def A084614(n,k): return sum(binomial(n,k-j)*binomial(k-j,j)*(-3)^j for j in range(k+1))
    def A084615(n): return sum(abs(A084614(n,k)) for k in range(2*n+1))
    [A084615(n) for n in range(50)] # G. C. Greubel, Mar 25 2023

Formula

a(n) = Sum_{k=0..2*n} abs( Sum_{j=0..k} binomial(n,k-j)*binomial(k-j,j)*(-3)^j ). - G. C. Greubel, Mar 25 2023

A084613 a(n) = sum of absolute values of coefficients of (1 + x - 2*x^2)^n.

Original entry on oeis.org

1, 4, 14, 44, 124, 394, 1418, 4706, 14322, 40712, 135878, 468934, 1513650, 4502864, 13421408, 45258442, 152708520, 483810550, 1413811358, 4483843328, 15051967962, 49724234652, 154802614364, 461020649750, 1486736569982
Offset: 0

Views

Author

Paul D. Hanna, Jun 01 2003

Keywords

Crossrefs

Programs

  • Magma
    A084612:= func< n,k | (&+[Binomial(n, k-j)*Binomial(k-j, j)*(-2)^j: j in [0..k]]) >;
    [(&+[Abs(A084612(n,k)): k in [0..2*n]]): n in [0..50]]; // G. C. Greubel, Mar 25 2023
    
  • Mathematica
    Table[Total[Abs[CoefficientList[Expand[(1+x-2x^2)^n],x]]],{n,0,30}]  (* Harvey P. Dale, Apr 21 2011 *)
  • PARI
    for(n=0,40,S=0; for(k=0,2*n,t=polcoeff((1+x-2*x^2)^n,k,x); S=S+abs(t)); print1(S","))
    
  • SageMath
    def A084612(n,k): return sum(binomial(n,k-j)*binomial(k-j,j)*(-2)^j for j in range(k+1))
    def A084613(n): return sum(abs(A084612(n,k)) for k in range(2*n+1))
    [A084613(n) for n in range(51)] # G. C. Greubel, Mar 25 2023

A084612 Triangle, read by rows, where the n-th row lists the (2n+1) coefficients of (1 + x - 2*x^2)^n.

Original entry on oeis.org

1, 1, 1, -2, 1, 2, -3, -4, 4, 1, 3, -3, -11, 6, 12, -8, 1, 4, -2, -20, 1, 40, -8, -32, 16, 1, 5, 0, -30, -15, 81, 30, -120, 0, 80, -32, 1, 6, 3, -40, -45, 126, 141, -252, -180, 320, 48, -192, 64, 1, 7, 7, -49, -91, 161, 357, -363, -714, 644, 728, -784, -224, 448, -128, 1, 8, 12, -56, -154, 168, 700, -328, -1791, 656, 2800
Offset: 0

Views

Author

Paul D. Hanna, Jun 01 2003

Keywords

Examples

			Triangle begins:
  1;
  1, 1, -2;
  1, 2, -3,  -4,   4;
  1, 3, -3, -11,   6,  12,  -8;
  1, 4, -2, -20,   1,  40,  -8,  -32,   16;
  1, 5,  0, -30, -15,  81,  30, -120,    0,  80, -32;
  1, 6,  3, -40, -45, 126, 141, -252, -180, 320,  48, -192, 64;
		

Crossrefs

Programs

  • Magma
    A084612:= func< n,k | (&+[Binomial(n, k-j)*Binomial(k-j, j)*(-2)^j: j in [0..k]]) >;
    [A084612(n,k): k in [0..2*n], n in [0..13]]; // G. C. Greubel, Mar 25 2023
    
  • Mathematica
    T[n_, k_]:= Sum[Binomial[n,k-j]*Binomial[k-j,j]*(-2)^j, {j,0,k}];
    Table[T[n, k], {n,0,12}, {k,0,2*n}]//Flatten (* G. C. Greubel, Mar 25 2023 *)
  • PARI
    {T(n,k)=polcoeff((1+x-2*x^2)^n, k)}
    for(n=0,10,for(k=0,2*n,print1(T(n,k),", "));print(""))
    
  • SageMath
    def A084612(n,k): return sum(binomial(n,k-j)*binomial(k-j,j)*(-2)^j for j in range(k+1))
    flatten([[A084612(n,k) for k in range(2*n+1)] for n in range(13)]) # G. C. Greubel, Mar 25 2023

Formula

From G. C. Greubel, Mar 25 2023: (Start)
T(n, k) = Sum_{j=0..k} binomial(n,k-j)*binomial(k-j,j)*(-2)^j, for 0 <= k <= 2*n.
T(n, 2*n) = (-2)^n.
T(n, 2*n-1) = (-1)^(n-1)*A001787(n), n >= 1.
Sum_{k=0..2*n} T(n, k) = A000007(n).
Sum_{k=0..2*n} (-1)^k*T(n, k) = (-2)^n. (End)
Showing 1-3 of 3 results.