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

A103142 a(n) = 2*a(n-1) + a(n-2) + a(n-3) + a(n-4), with a(0)=1, a(1)=2, a(3)=5, a(4)=13.

Original entry on oeis.org

1, 2, 5, 13, 34, 88, 228, 591, 1532, 3971, 10293, 26680, 69156, 179256, 464641, 1204374, 3121801, 8091873, 20974562, 54367172, 140922580, 365278767, 946821848, 2454212215, 6361447625, 16489208080, 42740897848, 110786663616, 287164880785, 744346531114
Offset: 0

Views

Author

Paul Barry, Jan 24 2005

Keywords

Comments

Row sums of generalized Pascal matrix A103141.
Generalized Pell numbers.
Row sums of the tetranacci convolution triangle A202193. - Philippe Deléham, Feb 16 2014

Crossrefs

Row sums of A103141 and of A202193.

Programs

  • GAP
    a:=[1,2,5,13];; for n in [5..40] do a[n]:=2*a[n-1]+a[n-2]+a[n-3]+a[n-4]; od; a; # G. C. Greubel, Feb 12 2020
  • Magma
    I:=[1,2,5,13]; [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, Feb 05 2012
    
  • Maple
    m:=40; S:=series(1/(1-2*x-x^2-x^3-x^4), x, m+1): seq(coeff(S, x, j), j=0..m); # G. C. Greubel, Feb 12 2020
  • Mathematica
    LinearRecurrence[{2,1,1,1}, {1,2,5,13}, 40] (* Vladimir Joseph Stephan Orlovsky, Jun 20 2011 *)
  • PARI
    Vec(1/(1-2*x-x^2-x^3-x^4)+O(x^40)) \\ Charles R Greathouse IV, Jun 20 2011
    
  • Sage
    def A103142_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( 1/(1-2*x-x^2-x^3-x^4) ).list()
    A103142_list(40) # G. C. Greubel, Feb 12 2020
    

Formula

a(n) = 2*a(n-1) + a(n-2) + a(n-3) + a(n-4).
G.f.: 1/(1 - 2*x - x^2 - x^3 - x^4).

Extensions

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

A102036 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), with T(0,0)=1.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 6, 5, 1, 1, 9, 15, 7, 1, 1, 12, 33, 28, 9, 1, 1, 15, 60, 81, 45, 11, 1, 1, 18, 96, 189, 161, 66, 13, 1, 1, 21, 141, 378, 459, 281, 91, 15, 1, 1, 24, 195, 675, 1107, 946, 449, 120, 17, 1, 1, 27, 258, 1107, 2349, 2673, 1742, 673, 153, 19, 1
Offset: 0

Views

Author

Paul D. Hanna, Dec 30 2004

Keywords

Comments

Row sums form A077939. This sequence was inspired by Luke Hanna.
Diagonal sums are A000078(n+3). - Philippe Deléham, Feb 16 2014
Riordan array (1/(1-x), x*(1+x+x^2)/(1-x)). - Philippe Deléham, Feb 16 2014

Examples

			Generated by adding preceding terms in the triangle at positions that form the letter 'L':
T(n,k) =
T(n-3,k-1) +
T(n-2,k-1) +
T(n-1,k-1) + T(n-1,k).
Rows begin:
  [1],
  [1,  1],
  [1,  3,   1],
  [1,  6,   5,   1],
  [1,  9,  15,   7,   1],
  [1, 12,  33,  28,   9,   1],
  [1, 15,  60,  81,  45,  11,  1],
  [1, 18,  96, 189, 161,  66, 13,  1],
  [1, 21, 141, 378, 459, 281, 91, 15, 1], ...
		

Crossrefs

Programs

  • Magma
    [[(&+[Binomial(n-m,k)*(&+[Binomial(j,m-j)*Binomial(k,j):j in [0..k]]): m in [0..n-k]]): k in [0..n]]: n in [0..15]]; // G. C. Greubel, Dec 11 2018
    
  • Maple
    T:=(n,k)->add(add((binomial(j,m-j)*binomial(k,j))*binomial(n-m,k),j=0..k),m=0..n-k): seq(seq(T(n,k),k=0..n),n=0..10); # Muniru A Asiru, Dec 11 2018
  • Mathematica
    T[n_, k_] := If[n < k || k < 0, 0, If[n == 0, 1, T[n - 1, k] + T[n - 1, k - 1] + T[n - 2, k - 1] + T[n - 3, k - 1]]]; Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Amiram Eldar, Dec 07 2018 *)
    Table[Sum[Binomial[n-m, k]*Sum[Binomial[j, m-j]*Binomial[k, j], {j, 0, k}], {m, 0, n-k}], {n, 0, 15}, {k, 0, n}]//Flatten (* G. C. Greubel, Dec 11 2018 *)
  • Maxima
    T(n,k):=sum((sum(binomial(j,m-j)*binomial(k,j),j,0,k))*binomial(n-m,k),m,0,n-k); /* Vladimir Kruchinin, Apr 21 2015 */
    
  • PARI
    {T(n,k)=if(n
    				
  • Sage
    [[sum(binomial(n-m,k)*sum(binomial(j,m-j)*binomial(k,j) for j in (0..k)) for m in (0..n-k)) for k in (0..n)] for n in range(15)] # G. C. Greubel, Dec 11 2018

Formula

G.f.: 1/(1-y-x*(1+y+y^2)). - Vladimir Kruchinin, Apr 21 2015
T(n,k) = Sum_{m=0..(n-k)} (Sum_{j=0..k} C(j,m-j)*C(k,j))*C(n-m,k). - Vladimir Kruchinin, Apr 21 2015
From Werner Schulte, Dec 07 2018: (Start)
G.f. of column k: Sum_{n>=0} T(n+k,k) * x^n = (1+x+x^2)^k / (1-x)^(k+1) = (1-x^3)^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(3*s))^k. (End)
Showing 1-2 of 2 results.