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.

A213569 Principal diagonal of the convolution array A213568.

Original entry on oeis.org

1, 7, 25, 71, 181, 435, 1009, 2287, 5101, 11243, 24553, 53223, 114661, 245731, 524257, 1114079, 2359261, 4980699, 10485721, 22020055, 46137301, 96468947, 201326545, 419430351, 872415181, 1811939275, 3758096329, 7784628167
Offset: 1

Views

Author

Clark Kimberling, Jun 18 2012

Keywords

Comments

Create a triangle having first column T(n,1) = 2*n-1 for n = 1,2,3... The remaining terms are set to T(r,c) = T(r,c-1) + T(r-1,c-1). The sum of the terms in row n is a(n). The first five rows of the triangle are 1; 3,4; 5,8,12; 7,12,20,32; 9,16,28,48,80. - J. M. Bergot, Jan 17 2013
Starting at n=1, a(n) = (n+1)*2^n - 2*n - 1. A001787(n) = n*2^n. - J. M. Bergot, Jan 27 2013

Crossrefs

Programs

  • GAP
    List([1..30], n-> 2^n*(n+1) -(2*n+1)); # G. C. Greubel, Jul 25 2019
  • Magma
    [2^n*(n+1) -(2*n+1): n in [1..30]]; // G. C. Greubel, Jul 25 2019
    
  • Maple
    f:= gfun:-rectoproc({a(n) = 6*a(n-1) - 13*a(n-2) + 12*a(n-3) - 4*a(n-4),
      a(1)=1,a(2)=7,a(3)=25,a(4)=71},a(n),remember):
    map(f, [$1..30]); # Robert Israel, Sep 19 2017
  • Mathematica
    (* First program *)
    b[n_]:= 2^(n-1); c[n_]:= n;
    t[n_, k_]:= Sum[b[k-i] c[n+i], {i, 0, k-1}]
    TableForm[Table[t[n, k], {n, 1, 10}, {k, 1, 10}]]
    Flatten[Table[t[n-k+1, k], {n, 12}, {k, n, 1, -1}]]
    r[n_]:= Table[t[n, k], {k, 1, 60}]  (* A213568 *)
    d = Table[t[n, n], {n, 1, 40}] (* A213569 *)
    s[n_]:= Sum[t[i, n+1-i], {i, 1, n}]
    s1 = Table[s[n], {n, 1, 50}] (* A047520 *)
    (* Additional programs *)
    LinearRecurrence[{6,-13,12,-4},{1,7,25,71},30] (* Harvey P. Dale, Jan 06 2015 *)
    Table[2^n*(n+1) -(2*n+1), {n,30}] (* G. C. Greubel, Jul 25 2019 *)
  • PARI
    my(x='x+O('x^30)); Vec(x*(1+x-4*x^2)/((1-2*x)^2*(1-x)^2)) \\ Altug Alkan, Sep 19 2017
    
  • PARI
    vector(30, n, 2^n*(n+1) -(2*n+1)) \\ G. C. Greubel, Jul 25 2019
    
  • Sage
    [2^n*(n+1) -(2*n+1) for n in (1..30)] # G. C. Greubel, Jul 25 2019
    

Formula

a(n) = 6*a(n-1) - 13*a(n-2) + 12*a(n-3) - 4*a(n-4).
G.f.: x*(1 + x - 4*x^2)/( (1-2*x)^2*(1-x)^2 ).
a(n) = A001787(n+1)- 2*n - 1. - J. M. Bergot, Jan 22 2013
a(n) = Sum_{k=1..n} Sum_{i=0..n} (n-i) * C(k,i). - Wesley Ivan Hurt, Sep 19 2017