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

A135356 Triangle T(n,k) read by rows: coefficients in the recurrence of sequences which equal their n-th differences.

Original entry on oeis.org

2, 2, 0, 3, -3, 2, 4, -6, 4, 0, 5, -10, 10, -5, 2, 6, -15, 20, -15, 6, 0, 7, -21, 35, -35, 21, -7, 2, 8, -28, 56, -70, 56, -28, 8, 0, 9, -36, 84, -126, 126, -84, 36, -9, 2, 10, -45, 120, -210, 252, -210, 120, -45, 10, 0, 11, -55, 165, -330, 462, -462, 330, -165, 55, -11, 2
Offset: 1

Views

Author

Paul Curtz, Dec 08 2007, Mar 25 2008, Apr 28 2008

Keywords

Comments

Sequences which equal their p-th differences obey recurrences a(n) = Sum_{s=1..p} T(p,s)*a(n-s).
This defines T(p,s) as essentially a signed version of a chopped Pascal triangle A014410, see A130785.
For cases like p=2, 4, 6, 8, 10, 12, 14, the denominator of the rational generating function of a(n) contains a factor 1-x; depending on the first terms in the sequences a(n), additional, simpler recurrences may exist if this cancels with a factor in the numerator. - R. J. Mathar, Jun 10 2008

Examples

			Triangle begins with row n=1:
  2;
  2,   0;
  3,  -3,  2;
  4,  -6,  4,    0;
  5, -10, 10,   -5,   2;
  6, -15, 20,  -15,   6,   0;
  7, -21, 35,  -35,  21,  -7,  2;
  8, -28, 56,  -70,  56, -28,  8,  0;
  9, -36, 84, -126, 126, -84, 36, -9, 2;
		

Crossrefs

Related sequences: A000079 (n=1), A131577 (n=2), (A131708 , A130785, A131562, A057079) (n=3), (A000749, A038503, A009545, A038505) (n=4), A133476 (n=5), A140343 (n=6), A140342 (n=7).

Programs

  • Magma
    A135356:= func< n,k | k eq n select 1-(-1)^n else (-1)^(k+1)*Binomial(n,k) >;
    [A135356(n,k): k in [1..n], n in [1..12]]; // G. C. Greubel, Apr 09 2023
    
  • Maple
    T:= (p, s)->  `if`(p=s, 2*irem(p, 2), (-1)^(s+1) *binomial(p, s)):
    seq(seq(T(p, s), s=1..p), p=1..11);  # Alois P. Heinz, Aug 26 2011
  • Mathematica
    T[p_, s_]:= If[p==s, 2*Mod[s, 2], (-1)^(s+1)*Binomial[p, s]];
    Table[T[p, s], {p, 12}, {s, p}]//Flatten (* Jean-François Alcover, Feb 19 2015, after Alois P. Heinz *)
  • SageMath
    def A135356(n,k):
        if (k==n): return 2*(n%2)
        else: return (-1)^(k+1)*binomial(n,k)
    flatten([[A135356(n,k) for k in range(1,n+1)] for n in range(1,13)]) # G. C. Greubel, Apr 09 2023

Formula

T(n,k) = (-1)^(k+1)*A007318(n, k). T(n,n) = 1 - (-1)^n.
Sum_{k=1..n} T(n, k) = 2.
From G. C. Greubel, Apr 09 2023: (Start)
Sum_{k=1..n} (-1)^(k-1)*T(n, k) = 2*A051049(n-1).
Sum_{k=1..n-1} T(n, k) = (1 + (-1)^n).
Sum_{k=1..n-1} (-1)^(k-1)*T(n, k) = A000225(n-1).
T(2*n, n) = (-1)^(n-1)*A000984(n), n >= 1. (End)

Extensions

Edited by R. J. Mathar, Jun 10 2008

A106233 An inverse Catalan transform of A003462.

Original entry on oeis.org

0, 1, 3, 5, 5, 0, -14, -41, -81, -121, -121, 0, 364, 1093, 2187, 3281, 3281, 0, -9842, -29525, -59049, -88573, -88573, 0, 265720, 797161, 1594323, 2391485, 2391485, 0, -7174454, -21523361, -43046721, -64570081, -64570081, 0, 193710244, 581130733, 1162261467
Offset: 0

Views

Author

Paul Barry, Apr 26 2005

Keywords

Comments

The g.f. is obtained from that of A003462 through the mapping g(x)->g(x(1-x)). A003462 may be retrieved through the mapping g(x)->g(xc(x)), where c(x) is the g.f. of A000108. Binomial transform of x(1+x)/(1+x^2+x^4).
The sequence is identical to its sixth differences. See A140344. - Paul Curtz, Nov 09 2012

Examples

			From _Paul Curtz_, Nov 09 2012: (Start)
The sequence and its higher-order differences (periodic after 6 rows):
   0,  1,  3,  5,  5,   0, -14, ...
   1,  2,  2,  0, -5, -14, -27, ...
   1,  0, -2, -5, -9, -13, -13, ...
  -1, -2, -3, -4, -4,   0,  13, ...   = -A134581(n+1)
  -1, -1, -1,  0,  4,  13,  27, ...
   0,  0,  1,  4,  9,  14,  14, ...   = A140343(n+2)
   0,  1,  3,  5,  5,   0, -14, ...
(End)
		

Crossrefs

Cf. A103368.

Programs

  • Magma
    I:=[0,1,3,5]; [n le 4 select I[n] else 4*Self(n-1)-7*Self(n-2)+ 6*Self(n-3)-3*Self(n-4): n in [1..40]]; // Vincenzo Librandi, Dec 24 2018
  • Mathematica
    LinearRecurrence[{4, -7, 6, -3}, {0, 1, 3, 5}, 35] (* Vincenzo Librandi, Dec 24 2018 *)

Formula

G.f.: x(1-x)/((1-x+x^2)*(1-3*x+3*x^2));
a(n) = Sum_{k=0..floor(n/2)} C(n-k, k)*(-1)^k*(3^(n-k)-1)/2.
a(n) = Sum_{k=0..n} A109466(n,k)*A003462(k). - Philippe Deléham, Oct 30 2008
a(n) = (1/2)*[A057083(n) - [1,1,0,0,-1,-1]6 ]. - _Ralf Stephan, Nov 15 2010
a(n) = 4*a(n-1) - 7*a(n-2) + 6*a(n-3) - 3*a(n-4) = A140343(n+2) - A140343(n+1). - Paul Curtz, Nov 09 2012
a(n) is the binomial transform of the sequence 0, 1, 1, -1, -1, 0, ... = A103368(n+5). - Paul Curtz, Nov 09 2012

A140344 Catalan triangle A009766 prepended by n zeros in its n-th row.

Original entry on oeis.org

1, 0, 1, 1, 0, 0, 1, 2, 2, 0, 0, 0, 1, 3, 5, 5, 0, 0, 0, 0, 1, 4, 9, 14, 14, 0, 0, 0, 0, 0, 1, 5, 14, 28, 42, 42, 0, 0, 0, 0, 0, 0, 1, 6, 20, 48, 90, 132, 132, 0, 0, 0, 0, 0, 0, 0, 1, 7, 27, 75, 165, 297, 429, 429, 0, 0, 0, 0, 0, 0, 0, 0, 1, 8, 35, 110, 275, 572, 1001, 1430, 1430
Offset: 0

Views

Author

Paul Curtz, May 29 2008

Keywords

Comments

The triangle's n-th row is also related to recurrences for sequences f(n) which p-th differences, p=n+2: The denominator of the generating function contains a factor 1-2x in these cases.
This factor may be "lifted" either by looking at auxiliary sequences f(n+1)-2f(n) or by considering the corresponding "degenerate" shorter recurrences right away. In the case p=4, the recurrence is f(n)=4f(n-1)-6f(n-2)+4f(n-3) from the 4th row in A135356, the denominator in the g.f. is 1-4x+6x^2-4x^3=(1-2x)(1-2x+2x^2), which yields the degenerate recurrence f(n)=2f(n-1)-2f(n-2) from the 2nd factor and leaves the first three coefficients of 1/(1-2x+2x^2)=1+2x+2x^2+.. in row 2.
A000749 is an example which follows the recurrence but not the degenerate recurrence, but still A000749(n+1)-2A000749(n) = 0, 0, 1, 2, 2,.. starts with the 3 coefficients. A009545 follows both recurrences and starts with the three nonzero terms because there is only a power of x in the numerator of the g.f.
In the case p=5, the recurrence is f(n)=5f(n-1)-10f(n-2)+10f(n-3)-5f(n-4)+2f(n-5), the denominator in the g.f. is 1-5x+10x^2-10x^3+5x^4-2x^5= (1-2x)(1-3x+4x^2-2x^3+x^4), where 1/(1-3x+4x^2-2x^3+x^4) = 1+3x+5x^2+5x^3+... and the 4 coefficients populate row 3.
A049016 obeys the main recurrence but not the degenerate recurrence f(n)=3f(n-1)-4f(n-2)+2f(n-3)-f(n-4), yet A049016(n+1)-2A049016(n)=1, 3, 5, 5,.. starts with the 4 coefficients. A138112 obeys both recurrences and is constructed to start with the 4 coefficients themselves.
In the nomenclature of Foata and Han, this is the doubloon polynomial triangle d_{n,m}(0), up to index shifts. - R. J. Mathar, Jan 27 2011

Examples

			Triangle starts
1;
0,1,1;
0,0,1,2,2;
0,0,0,1,3,5,5;
0,0,0,0,1,4,9,14,14;
		

Crossrefs

Cf. A135356, A130020, A139687, A140343 (p=6), A140342 (p=7).

Programs

  • Mathematica
    Table[Join[Array[0&, n], Table[Binomial[n+k, n]*(n-k+1)/(n+1), {k, 0, n}]], {n, 0, 8}] // Flatten (* Jean-François Alcover, Dec 16 2014 *)

Extensions

Edited by R. J. Mathar, Jul 10 2008

A139687 Basis of degenerate cases of sequences identical to its p-th differences. Complement to A140344 which is based on natural Catalan's triangle. Triangle without first term (probable 1) on line.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 3, 5, 5, 1, 3, 6, 9, 9, 1, 4, 10, 19, 28, 28, 1, 4, 10, 20, 34, 48, 48, 1, 5, 15, 35, 69, 117, 165, 165, 1, 5, 15, 35, 70, 125, 200, 275, 275, 1, 6, 21, 56, 126, 251, 451, 726, 1001, 1001, 1, 6, 21, 56, 126, 252, 461, 780, 1209, 1638, 1638
Offset: 0

Views

Author

Paul Curtz, Jun 13 2008

Keywords

Comments

Triangle from A140344:
(1;)
0, 1, 1;
0, 0, 1, 2, 2;
0, 0, 0, 1, 3, 5, 5; see A138112,
0, 0, 0, 0, 1, 4, 9, 14, 14; see A140343,
begins (without 0's) like a(n).

Crossrefs

Formula

First four rows of triangle from second row: 1, 1; 1, 2, 2; see A099087, 1, 3, 5, 5; 1, 3, 6, 9, 9; see A057083 which can be preceded with 3 leading 0's, are, as said, from natural Catalan's triangle A009766. Origin of a(n) explained later.

A140342 a(n)=5a(n-1)-11a(n-2)+13a(n-3)-9a(n-4)+3a(n-5)-a(n-6).

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 5, 14, 28, 42, 42, 0, -131, -417, -924, -1652, -2380, -2380, 0, 7753, 25213, 56714, 102256, 147798, 147798, 0, -479779, -1557649, -3499720, -6305992, -9112264, -9112264, 0, 29587889, 96072133, 215873462, 388991876, 562110290, 562110290, 0
Offset: 0

Views

Author

Paul Curtz, May 29 2008

Keywords

Comments

This is the main sequence representing the degenerate case of sequences which equal their seventh difference, where besides the generic a(n)=7a(n-1)-21(n-2)+35a(n-3)-35a(n-4)+21a(n-5)-7a(n-6)+2a(n-7), cf. A135356, there is also a shorter recurrence.
After the first four terms, every seventh term is zero. - Harvey P. Dale, Sep 20 2012

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{5,-11,13,-9,3,-1},{0,0,0,0,0,1},40] (* Harvey P. Dale, Sep 20 2012 *)

Formula

O.g.f.: x^5/(1-5x+11x^2-13x^3+9x^4-3x^5+x^6). - R. J. Mathar, Jul 10 2008

Extensions

Edited and extended by R. J. Mathar, Jul 10 2008

A134581 a(n) = 4*a(n-1) - 7*a(n-2) + 6*a(n-3) - 3*a(n-4), starting with 0, 1, 2, 3.

Original entry on oeis.org

0, 1, 2, 3, 4, 4, 0, -13, -40, -81, -122, -122, 0, 365, 1094, 2187, 3280, 3280, 0, -9841, -29524, -59049, -88574, -88574, 0, 265721, 797162, 1594323, 2391484, 2391484, 0, -7174453, -21523360, -43046721, -64570082, -64570082, 0
Offset: 0

Views

Author

Paul Curtz, Jan 23 2008

Keywords

Programs

  • Mathematica
    LinearRecurrence[{4, -7, 6, -3}, {0, 1, 2, 3}, 50] (* Harvey P. Dale, Dec 06 2013 *)
    a[ n_] := Nest[# + RotateRight @ #&, {0, -1, 0, 0, 0, 1}, n][[1]]; (* Michael Somos, Jan 18 2023 *)

Formula

G.f.: x*(1-2*x+2*x^2)/((1-x+x^2)*(1-3*x+3*x^2)). - Jaume Oliver Lafont, Aug 30 2009
a(n) = A140343(n+3) - 2*A140343(n+2) + 2*A140343(n+1). - R. J. Mathar, Nov 21 2012
From Peter Bala, Jul 24 2017: (Start)
a(6*n) = 0;
a(6*n+1) = ((-1)^n*3^(3*n) + 1)/2;
a(6*n+2) = ((-1)^n*3^(3*n+1) + 1)/2;
a(6*n+3) = (-1)^n*3^(3*n+1);
a(6*n+4) = a(6*n+5) = ((-1)^n*3^(3*n+2) - 1)/2.
The o.g.f. A(x) satisfies (1 - x)*A(x) = x*A(1 - x).
Logarithmic g.f.: (1/sqrt(3))*arctan(sqrt(3)*x*(1 - x)/(1 - 2*x)) = Sum_{n >= 1} a(n)*x^n/n.
Sum_{n >= 1} a(n)/(n*2^n) = Pi/(2*sqrt(3)). (End)
a(n) = (3^(n/2) * sin(Pi*n/6) + sin(Pi*n/3)) / sqrt(3). - Peter Luschny, Jul 24 2017
2*a(n) = A010892(n-1) + A057083(n-1). - R. J. Mathar, Oct 03 2021
a(n) = -26*a(n-6) + 27*a(n-12) for all n in Z. - Michael Somos, Jan 18 2023
Showing 1-6 of 6 results.