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.

A248158 Expansion of (1 - 2*x^2)/(1 + x)^3. Second column of Riordan triangle A248156.

Original entry on oeis.org

1, -3, 4, -4, 3, -1, -2, 6, -11, 17, -24, 32, -41, 51, -62, 74, -87, 101, -116, 132, -149, 167, -186, 206, -227, 249, -272, 296, -321, 347, -374, 402, -431, 461, -492, 524, -557, 591, -626, 662, -699, 737, -776, 816, -857, 899, -942, 986
Offset: 0

Views

Author

Wolfdieter Lang, Oct 05 2014

Keywords

Comments

This is the column k=1 sequence of the Riordan triangle A248156 without a leading zero.

Crossrefs

Cf. A046691, A148157, A248156(n+1,1).

Programs

  • Magma
    [(-1)^n*(2+5*n-n^2)/2: n in [0..60]]; // G. C. Greubel, May 30 2025
    
  • Mathematica
    Table[(-1)^n*(2+5*n-n^2)/2, {n,0,60}] (* G. C. Greubel, May 30 2025 *)
  • Python
    def A248158(n): return (-1)**n*(2+5*n-n**2)//2
    print([A248158(n) for n in range(51)]) # G. C. Greubel, May 30 2025

Formula

O.g.f.: (1 - 2*x^2)/(1 + x)^3 = -2/(1 + x) + 4/(1 + x)^2 - 1/(1 + x)^3.
a(n) = (-1)^n*(4*(2*n+1) - (n+1)*(n+2))/2, n >= 0.
a(n) = -3*(a(n-1) + a(n-2)) - a(n-3), n >= 3 with a(0) = 1, a(1) = -3 and a(2) = 4.
From R. J. Mathar, Mar 13 2021: (Start)
a(n) = (-1)^(n+1)*A046691(n-5).
a(n) + a(n+1) = A248157(n+1). (End)
E.g.f.: (1/2)*(2 - 4*x - x^2)*exp(-x). - G. C. Greubel, May 30 2025

A248159 Expansion of (1 - 2*x^2)/(1 + x)^4. Third column of Riordan triangle A248156.

Original entry on oeis.org

1, -4, 8, -12, 15, -16, 14, -8, -3, 20, -44, 76, -117, 168, -230, 304, -391, 492, -608, 740, -889, 1056, -1242, 1448, -1675, 1924, -2196, 2492, -2813, 3160, -3534, 3936, -4367, 4828, -5320, 5844, -6401, 6992, -7618, 8280, -8979, 9716
Offset: 0

Views

Author

Wolfdieter Lang, Oct 07 2014

Keywords

Comments

This is the column k=2 sequence of the Riordan triangle A248156 without the leading two zeros.

Crossrefs

Cf. A248156 (k=2).
Cf. A248157 (k=0), A248158 (k=1).

Programs

Formula

O.g.f.: (1 - 2*x^2)/(1 + x)^4 = -1/(1 + x)^4 + 4/(1 + x)^3 -2/(1 + x)^2.
a(n) = (-1)^n*(n+1)*(6 + 7*n - n^2)/3!, n >= 0.
a(n) = -4*(a(n-1) + a(n-3)) - 6*a(n-2) - a(n-4), n >= 4, with a(0) =1, a(1) = -4, a(2) = 8 and a(3) = -12.
a(n) + a(n+1) = A248158(n+1). - R. J. Mathar, Mar 13 2021
E.g.f.: (1/6)*(6 - 18*x + 3*x^2 + x^3)*exp(-x). - G. C. Greubel, May 30 2025

A248160 Expansion of (1 - 2*x^2)/(1 + x)^5. Fourth column of Riordan triangle A248156.

Original entry on oeis.org

1, -5, 13, -25, 40, -56, 70, -78, 75, -55, 11, 65, -182, 350, -580, 884, -1275, 1767, -2375, 3115, -4004, 5060, -6302, 7750, -9425, 11349, -13545, 16037, -18850, 22010, -25544, 29480, -33847, 38675, -43995, 49839, -56240, 63232, -70850, 79130, -88109, 97825, -108317, 119625, -131790
Offset: 0

Views

Author

Wolfdieter Lang, Oct 09 2014

Keywords

Comments

This is column k=3 of the Riordan triangle A248156 without the leading three zeros.

Crossrefs

Cf. A248156 (column k=3).
Cf. A248157 (k=0), A248158 (k=1), A248159 (k=2).

Programs

  • Magma
    [(-1)^n*(n + 1)*(n + 2)*(12 + 9*n - n^2)/24: n in [0..50]]; // G. C. Greubel, May 30 2025
    
  • Maple
    A248160:=n->(-1)^n*(n+1)*(n+2)*(12 + 9*n - n^2)/4!: seq(A248160(n), n=0..30); # Wesley Ivan Hurt, Oct 09 2014
  • Mathematica
    Table[(-1)^n*(n + 1)*(n + 2)*(12 + 9*n - n^2)/4!, {n, 0, 30}] (* Wesley Ivan Hurt, Oct 09 2014 *)
    CoefficientList[Series[(1-2x^2)/(1+x)^5,{x,0,50}],x] (* or *) LinearRecurrence[ {-5,-10,-10,-5,-1},{1,-5,13,-25,40},50] (* Harvey P. Dale, Apr 13 2019 *)
  • PARI
    Vec((1 - 2*x^2)/(1 + x)^5 + O(x^50)) \\ Michel Marcus, Oct 09 2014
    
  • Python
    def A248160(n): return (-1)**n*(n+1)*(n+2)*(12+9*n-n**2)//24 # G. C. Greubel, May 30 2025

Formula

O.g.f.: (1 - 2*x^2)/(1 + x)^5 = -2/(1 + x)^3 + 4/(1 + x)^4 - 1/(1 + x)^5.
a(n) = (-1)^n*(n+1)*(n+2)*(12 + 9*n - n^2)/4!.
a(n) = -5*(a(n-1) + a(n-4)) - 10*(a(n-2) + a(n-3)) - a(n-5), n >= 5, with a(0) =1, a(1) = -5, a(2) = 13, a(3) = -25 and a(4) = 40.
E.g.f.: (1/4!)*(24 - 96*x + 48*x^2 - x^4)*exp(-x). - G. C. Greubel, May 30 2025

A248157 Expansion of (1 - 2*x^2)/(1 + x)^2.

Original entry on oeis.org

1, -2, 1, 0, -1, 2, -3, 4, -5, 6, -7, 8, -9, 10, -11, 12, -13, 14, -15, 16, -17, 18, -19, 20, -21, 22, -23, 24, -25, 26, -27, 28, -29, 30, -31, 32, -33, 34, -35, 36, -37, 38, -39, 40, -41, 42, -43, 44, -45, 46, -47, 48, -49, 50, -51, 52, -53, 54, -55, 56, -57
Offset: 0

Views

Author

Wolfdieter Lang, Oct 05 2014

Keywords

Comments

First column of Riordan triangle A248156.

Crossrefs

Cf. A038608, A097141, A248156 (row k=0).

Programs

  • Magma
    A248157:= func< n | n eq 0 select 1 else (-1)^n*(3-n) >; // G. C. Greubel, May 16 2025
    
  • Mathematica
    CoefficientList[Series[(1-2x^2)/(1+x)^2,{x,0,60}],x] (* or *) LinearRecurrence[{-2,-1},{1,-2,1},60] (* Harvey P. Dale, Aug 25 2023 *)
  • PARI
    Vec((1 - 2*x^2)/(1 + x)^2 + O(x^80)) \\ Michel Marcus, Oct 11 2014
    
  • SageMath
    def A248157(n): return (-1)^n*(3-n) - 2*int(n==0) # G. C. Greubel, May 16 2025

Formula

O.g.f.: (1 - 2*x^2)/(1 + x)^2 = -2 + 4/(1+x) - 1/(1+x)^2.
a(n) = -2*delta(n,0) + (-1)^n*(3 - n), n >= 0, with Kronecker delta(n,0) = 1 if n=0 else 0.
a(0) = 1, a(n) = -2*a(n-1) - a(n-2), n >= 3, with a(1) = -2, a(2) = 1.
a(n) = A038608(n-3) = A097141(n-1), n>=3.
E.g.f.: (3+x)*exp(-x) - 2. - G. C. Greubel, May 16 2025

A106513 A Pell-Pascal matrix.

Original entry on oeis.org

1, 2, 1, 5, 3, 1, 12, 8, 4, 1, 29, 20, 12, 5, 1, 70, 49, 32, 17, 6, 1, 169, 119, 81, 49, 23, 7, 1, 408, 288, 200, 130, 72, 30, 8, 1, 985, 696, 488, 330, 202, 102, 38, 9, 1, 2378, 1681, 1184, 818, 532, 304, 140, 47, 10, 1, 5741, 4059, 2865, 2002, 1350, 836, 444, 187, 57, 11, 1
Offset: 0

Views

Author

Paul Barry, May 05 2005

Keywords

Comments

This triangle gives the iterated partial sums of the Pell sequence A000129(n+1), n>=0. - Wolfdieter Lang, Oct 05 2014

Examples

			The triangle T(n,k) begins:
n\k    0    1    2    3    4   5   6   7  8  9 10 ...
0:     1
1:     2    1
2:     5    3    1
3:    12    8    4    1
4:    29   20   12    5    1
5:    70   49   32   17    6   1
6:   169  119   81   49   23   7   1
7:   408  288  200  130   72  30   8   1
8:   985  696  488  330  202 102  38   9  1
9:  2378 1681 1184  818  532 304 140  47 10  1
10: 5741 4059 2865 2002 1350 836 444 187 57 11  1
... Reformatted and extended. - _Wolfdieter Lang_, Oct 05 2014
-----------------------------------------------------
Recurrence from the Z-sequence (see the formula above) for T(0,n) in terms of the entries of row n-1. For example, 29 = T(4,0) = 2*12 + 1*8 + (-1)*4 + 1*1 = 29. - _Wolfdieter Lang_, Oct 05 2014
		

Crossrefs

Cf. A000129, A001333, A106514 (row sums), A106515 (antidiagonal sums), A248156.

Programs

  • Magma
    [ (&+[Binomial(n+1, 2*j+k+1)*2^j: j in [0..Floor((n+1)/2)]]) : k in [0..n], n in [0..12]]; // G. C. Greubel, Aug 05 2021
    
  • Mathematica
    T[n_, k_]= Sum[Binomial[n+1, 2*j+k+1]*2^j, {j, 0, Floor[(n+1)/2]}];
    Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Aug 05 2021 *)
  • Sage
    @CachedFunction
    def T(n, k):
        if (k<0 or k>n): return 0
        elif (k==0): return lucas_number1(n+1, 2, -1)
        else: return T(n-1,k-1) + T(n-1,k)
    flatten([[T(n, k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Aug 05 2021

Formula

Riordan array (1/(1-2*x-x^2), x/(1-x)).
Number triangle T(n,0) = A000129(n+1), T(n,k) = T(n-1,k-1) + T(n-1,k).
T(n,k) = Sum_{j=0..floor((n+1)/2)} binomial(n+1, 2*j+k+1)*2^j.
Sum_{k=0..n} T(n, k) = A106514(n).
Sum_{k=0..floor(n/2)} T(n-k, k) = A106515(n).
T(n,k) = 3*T(n-1,k) + T(n-1,k-1) - T(n-2,k) - 2*T(n-2,k-1) - T(n-3,k) - T(n-3,k-1), T(0,0)=1, T(1,0)=2, T(1,1)=1, T(n,k)=0 if k<0 or if k>n. - Philippe Deléham, Jan 14 2014
From Wolfdieter Lang, Oct 05 2014: (Start)
O.g.f. for row polynomials R(n,x) = Sum_{k=0..n} T(n,k)*x^k: (1 - z)/((1 - 2*z - z^2)*(1 - (1+x)*z)).
O.g.f. column m: (1/(1 - 2*z - z^2))*(z/(1 - z))^m, m >= 0. (Riordan property).
The alternating row sums are shown in A001333.
A-sequence: [1, 1] (see the three term recurrence given above). Z-sequence has o.g.f. (2 + 3*x)/(1 + x), [2, 1, repeat(-1,1)] (unsigned A054977). See the W. Lang link under A006232 for Riordan A- and Z-sequences.
The inverse Riordan triangle is shown in A248156. (End)

A248161 Expansion of (2-x+x^2)/((1+x)*(1-3*x+x^2)).

Original entry on oeis.org

2, 3, 11, 26, 71, 183, 482, 1259, 3299, 8634, 22607, 59183, 154946, 405651, 1062011, 2780378, 7279127, 19056999, 49891874, 130618619, 341963987, 895273338, 2343856031, 6136294751, 16065028226, 42058789923, 110111341547
Offset: 0

Views

Author

Wolfdieter Lang, Nov 01 2014

Keywords

Comments

The negative of this sequence provides the first component of the square of [F(n), F(n+1), F(n+2), F(n+3)], for n >= 0, where F(n) = A000045(n), in the Clifford algebra Cl_2 over Euclidean 2-space. The whole quartet of sequences for this square is [-a(n), A079472(n+1), A059929(n), A121801(n+1)]. See the Oct 15 2014 comment in A147973 where also a reference is given.

Crossrefs

Programs

  • Magma
    [-(Fibonacci(n)^2 +Fibonacci(n+1)^2 + Fibonacci(n+2)^2 - Fibonacci(n+3)^2): n in [0..30]]; // Vincenzo Librandi, Nov 01 2014
    
  • Mathematica
    CoefficientList[Series[(2 - x + x^2)/((1 + x) (1 - 3 x + x^2)), {x, 0, 30}], x] (* Vincenzo Librandi, Nov 01 2014 *)
    With[{F=Fibonacci}, Table[F[2*n+2] +F[n]*F[n+1] +(-1)^n, {n,0,40}]] (* G. C. Greubel, May 30 2025 *)
  • SageMath
    def A248161(n): return fibonacci(2*n+2) +fibonacci(n)*fibonacci(n+1) +(-1)^n
    print([A248161(n) for n in range(41)]) # G. C. Greubel, May 30 2025

Formula

a(n) = F(n+3)^2 - (F(n)^2 + F(n+1)^2 + F(n+2)^2), F(n) = A000045(n).
a(n) = (6*F(2*n+2) + F(2*n) + 4*(-1)^n)/5, with the Fibonacci numbers F = A000045.
O.g.f.: (2-x+x^2)/((1+x)*(1-3*x+x^2)) = (4/(1+x) + (x+6)/(1-3*x+x^2))/5.
From G. C. Greubel, May 30 2025: (Start)
a(n) = Fibonacci(2*n+2) + Fibonacci(n)*Fibonacci(n+1) + (-1)^n.
E.g.f.: (1/5)*(exp(3*x/2)*(6*cosh(sqrt(5)*x/2) + 4*sqrt(5)*sinh(sqrt(5)*x/2)) + 4*exp(-x)). (End)

Extensions

Typo in formula fixed by Vincenzo Librandi, Nov 01 2014
Showing 1-6 of 6 results.