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-4 of 4 results.

A103141 Riordan array (1/(1-x), x*(1 + x + x^2 + x^3)/(1-x)).

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 6, 5, 1, 1, 10, 15, 7, 1, 1, 14, 35, 28, 9, 1, 1, 18, 68, 84, 45, 11, 1, 1, 22, 116, 207, 165, 66, 13, 1, 1, 26, 180, 441, 491, 286, 91, 15, 1, 1, 30, 260, 840, 1251, 996, 455, 120, 17, 1, 1, 34, 356, 1464, 2823, 2948, 1814, 680, 153, 19, 1
Offset: 0

Views

Author

Paul Barry, Jan 24 2005

Keywords

Comments

Generalized Pascal matrix: row sums are generalized Pell numbers A103142 and diagonal sums are the Pentanacci numbers A001591(n+4). One of a family of generalized Pascal triangles given by the Riordan arrays (1/(1-x), x*Sum_{j=0..k} x^k/(1-x)). This array has the 'k+2-nacci' numbers as diagonal sums and generalized Pell numbers b(n) = 2b(n-1) + Sum_{j=1..k} b(n-1-j) as row sums. The first two arrays of the family are Pascal's triangle and the Delannoy number triangle.

Examples

			Triangle begins
  1;
  1,  1;
  1,  3,   1;
  1,  6,   5,    1;
  1, 10,  15,    7,    1;
  1, 14,  35,   28,    9,    1;
  1, 18,  68,   84,   45,   11,    1;
  1, 22, 116,  207,  165,   66,   13,   1;
  1, 26, 180,  441,  491,  286,   91,  15,   1;
  1, 30, 260,  840, 1251,  996,  455, 120,  17,  1;
  1, 34, 356, 1464, 2823, 2948, 1814, 680, 153, 19, 1; ...
		

Crossrefs

Cf. A102036.

Programs

  • Mathematica
    T[?Positive, 0] = 1; T[n, n_] = 1; T[n_, k_] /; 0, ] = 0; Table[T[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Apr 24 2017 *)
  • PARI
    T(n,k)=polcoef(polcoef(1/(1-x-x*y*(1+x+x^2+x^3)) + O(x*x^n), n), k) \\ Andrew Howroyd, Dec 12 2018
    
  • Sage
    def A103141Triangle(dim):
        def B(n): return n if n < 5 else 4
        M = matrix(ZZ, dim, dim)
        for k in (0..dim-1): M[k, 0] = 1
        for k in (1..dim-1):
            for m in (k..dim-1):
                M[m, k] = sum(M[j, k-1]*B(m-j) for j in (k-1..m-1))
        return M
    A103141Triangle(11) # Peter Luschny, Dec 22 2018

Formula

Triangle, read by rows, where the terms are generated by the rule: T(n, k) = T(n-1, k) + T(n-1, k-1) + T(n-2, k-1) + T(n-3, k-1) + T(n-4, k-1), with T(0, 0)=1.
G.f.: 1/(1-x-x*y*(1+x+x^2+x^3)). - Vladimir Kruchinin, Apr 21 2015
From Werner Schulte, Dec 07 2018, Dec 12 2018, Dec 13 2018: (Start)
G.f. of column k: Sum_{n>=0} T(n+k,k) * x^n = (1+x+x^2+x^3)^k / (1-x)^(k+1) = (1-x^4)^k / (1-x)^(2*k+1).
Let k >= 0 be some fixed integer and a_k(n) be multiplicative with a_k(p^e) = T(e+k,k) for prime p and e >= 0. Then we have the Dirichlet g.f.: Sum{n>0} a_k(n) / n^s = (zeta(s))^(2*k+1) / (zeta(4*s))^k.
T(n,k) = Sum_{i=0..n-k} binomial(n-i,k) * (Sum_{j=0..i} binomial(k,j) * binomial(3*k-2*j,i-j) * (-2)^j) for 0 <= k <= n (conjectured).
T(n,k) = Sum_{i=0..n-k} binomial(n-i,k) * (Sum_{j=0..floor(i/4)} (-1)^j * binomial(k,j) * binomial(k-1+i-4*j,i-4*j)) for 0 <= k <= n.
T(n,k) = Sum_{i=0..n-k} binomial(n-i,k) * (Sum_{j=0..floor(i/2)} binomial(k,j) * binomial(k,i-2*j)) for 0 <= k <= n. (End)

A141448 Generalized Pell numbers P(n,5,5).

Original entry on oeis.org

0, 1, 2, 5, 13, 34, 89, 232, 605, 1578, 4116, 10736, 28003, 73041, 190515, 496926, 1296147, 3380779, 8818187, 23000741, 59993521, 156482896, 408159020, 1064613385, 2776862948, 7242974718, 18892067685, 49276745441, 128530009618
Offset: 0

Views

Author

R. J. Mathar, Aug 07 2008

Keywords

Comments

P(n,2,2) and P(n,2,1) are in A000129.
P(n,3,2) is A116413. P(n,3,1) and P(n,3,3) are A077939.
P(n,4,1) and P(n,4,4) are A103142.

Programs

  • Magma
    I:=[0,1,2,5,13]; [n le 5 select I[n] else 2*Self(n-1)+Self(n-2)+Self(n-3)+Self(n-4)+Self(n-5): n in [1..30]]; // Vincenzo Librandi, Dec 13 2012
  • Maple
    P := proc(n,k,i) option remember ; if n = 1-i then 1; elif n <= 0 then 0; else 2*P(n-1,k,i)+add(P(n-j,k,i),j=2..k) ; fi ; end: for n from 0 to 40 do printf("%d,",P(n,5,5)) ; od:
  • Mathematica
    CoefficientList[Series[x/(1 - 2*x - x^2 - x^3 - x^4 - x^5), {x, 0, 40}], x] (* Vincenzo Librandi, Dec 13 2012 *)
    LinearRecurrence[{2,1,1,1,1},{0,1,2,5,13},40] (* Harvey P. Dale, Jan 08 2016 *)
  • Maxima
    a(n):=b(n+1);
    b(n):=sum(sum(binomial(k,r)*2^(k-r)*sum((sum(binomial(j,-r+n-m-k-j)*binomial(m,j),j,0,m))*binomial(r,m),m,0,r),r,0,k),k,1,n); /* Vladimir Kruchinin, May 05 2011 */
    

Formula

From R. J. Mathar, Nov 28 2008: (Start)
a(n) = 2*a(n-1) + a(n-2) + a(n-3) + a(n-4) + a(n-5).
G.f.: x/(1-2*x-x^2-x^3-x^4-x^5). (End)
a(n+1) = Sum_(k=1..n, Sum_(r=0..k, binomial(k,r)*2^(k-r)*Sum_(m=0..r,(Sum_(j=0..m, binomial(j,-r+n-m-k-j)*binomial(m,j)))*binomial(r,m)))), a(0)=0, a(1)=1. [Vladimir Kruchinin, May 05 2011]

A190139 a(n) = 2*a(n-1) + a(n-2) + a(n-3) + a(n-4), a(-2)=0, a(-1)=0, a(0)=1, a(1)=1.

Original entry on oeis.org

1, 1, 3, 8, 21, 54, 140, 363, 941, 2439, 6322, 16387, 42476, 110100, 285385, 739733, 1917427, 4970072, 12882689, 33392610, 86555408, 224356187, 581543081, 1507390367, 3907235410, 10127760455, 26251689768, 68045765768, 176378217169, 457181650329, 1185038973363
Offset: 0

Views

Author

Vladimir Kruchinin, May 05 2011

Keywords

Comments

Number of compositions of n where there is one sort of part 1, two sorts of part 2, three sorts of part 3, and four sorts of every other part. - Joerg Arndt, Mar 15 2014

Programs

  • Magma
    I:=[1,1,3,8]; [n le 4 select I[n] else 2*Self(n-1)+Self(n-2)+Self(n-3)+Self(n-4): n in [1..40]]; // Vincenzo Librandi, Sep 20 2011
    
  • Mathematica
    RecurrenceTable[{a[n] == 2 a[n - 1] + a[n - 2] + a[n - 3] + a[n - 4], a[-2] == a[-1] == 0, a[0] == a[1] == 1}, a, {n, 0, 30}] (* Michael De Vlieger, Oct 28 2015 *)
    LinearRecurrence[{2, 1, 1, 1}, {1, 1, 3, 8}, 31] (* Michael De Vlieger, Oct 28 2015 *)
    nxt[{a_,b_,c_,d_}]:={b,c,d,2d+c+b+a}; NestList[nxt,{0,0,1,1},50][[All,1]] (* Harvey P. Dale, Mar 04 2022 *)
  • Maxima
    a(n):=sum(sum((sum(binomial(k,j)*sum(binomial(j,i-j)*binomial(k-j,t-3*(k-j)-i),i,j,t-k+j),j,0,k))*binomial(-t+n+k-1,k-1),t,k,n),k,1,n);
    
  • PARI
    x='x+O('x^30); Vec((1-x)/(1-2*x-x^2-x^3-x^4)) \\ G. C. Greubel, Dec 29 2017

Formula

G.f.: (1-x)/(1-2*x-x^2-x^3-x^4).
a(n) = Sum_{k=1..n} (Sum_{t=k..n} (Sum_{j=0..k} C(k,j) * Sum_{i=j..t-k+j} C(j,i-j)*C(k-j,t-3*(k-j)-i)*C(-t+n+k-1,k-1))), n>0, a(0)=1.
a(n) = A103142(n) - A103142(n-1). - R. J. Mathar, Sep 17 2011

Extensions

Deleted certain dangerous or potentially dangerous links. - N. J. A. Sloane, Jan 30 2021

A202193 Triangle read by rows: T(n,m) = coefficient of x^n in expansion of (x/(1 - x - x^2 - x^3 - x^4))^m.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 4, 5, 3, 1, 8, 12, 9, 4, 1, 15, 28, 25, 14, 5, 1, 29, 62, 66, 44, 20, 6, 1, 56, 136, 165, 129, 70, 27, 7, 1, 108, 294, 401, 356, 225, 104, 35, 8, 1, 208, 628, 951, 944, 676, 363, 147, 44, 9, 1, 401, 1328, 2211, 2424, 1935, 1176, 553, 200, 54, 10, 1
Offset: 1

Views

Author

Vladimir Kruchinin, Dec 14 2011

Keywords

Comments

From Philippe Deléham, Feb 16 2014: (Start)
As a Riordan array, this is (1/(1 - x - x^2 - x^3 - x^4), x/(1 - x - x^2 - x^3 - x^4)).
T(n,0) = A000078(n+3); T(n+1,1) = A118898(n+4).
Row sums are A103142(n).
Diagonal sums are A077926(n)*(-1)^n.
Tetranacci convolution triangle. (End)

Examples

			Triangle begins:
   1;
   1,  1;
   2,  2,  1;
   4,  5,  3,  1;
   8, 12,  9,  4,  1;
  15, 28, 25, 14,  5,  1;
  29, 62, 66, 44, 20,  6,  1;
		

Crossrefs

Similar sequences : A037027 (Fibonacci convolution triangle), A104580 (tribonacci convolution triangle). - Philippe Deléham, Feb 16 2014

Programs

  • Maxima
    T(n,m):=if n=m then 1 else sum(sum((-1)^i*binomial(k,k-i)*binomial(n-m-4*i-1,k-1),i,0,(n-m-k)/4)*binomial(k+m-1,m-1),k,1,n-m);

Formula

T(n,m) = Sum_{k=1..n-m} (Sum_{i=0..floor((n-m-k)/4)} (-1)^i*binomial(k,k-i)*binomial(n-m-4*i-1,k-1))*binomial(k+m-1,m-1), n > m, T(n,n)=1.
T(n,k) = T(n-1,k) + T(n-1,k-1) + T(n-2,k) + T(n-3,k) + T(n-4,k), T(0,0) = 1, T(n,k) = 0 if k < 0 or if k > n. - Philippe Deléham, Feb 16 2014
G.f. for column m: (x/(1 - x - x^2 - x^3 - x^4))^m. - Jason Yuen, Feb 17 2025
Showing 1-4 of 4 results.