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

A072405 Triangle T(n, k) = C(n,k) - C(n-2,k-1) for n >= 3 and T(n, k) = 1 otherwise, read by rows.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 3, 4, 3, 1, 1, 4, 7, 7, 4, 1, 1, 5, 11, 14, 11, 5, 1, 1, 6, 16, 25, 25, 16, 6, 1, 1, 7, 22, 41, 50, 41, 22, 7, 1, 1, 8, 29, 63, 91, 91, 63, 29, 8, 1, 1, 9, 37, 92, 154, 182, 154, 92, 37, 9, 1, 1, 10, 46, 129, 246, 336, 336, 246, 129, 46, 10, 1, 1, 11, 56, 175, 375, 582, 672, 582, 375, 175, 56, 11, 1
Offset: 0

Views

Author

Henry Bottomley, Jun 16 2002

Keywords

Comments

Starting 1,0,1,1,1,... this is the Riordan array ((1-x+x^2)/(1-x), x/(1-x)). Its diagonal sums are A006355. Its inverse is A106509. - Paul Barry, May 04 2005

Examples

			Rows start as:
  1;
  1, 1;
  1, 1,  1; (key row for starting the recurrence)
  1, 2,  2,  1;
  1, 3,  4,  3,  1;
  1, 4,  7,  7,  4, 1;
  1, 5, 11, 14, 11, 5, 1;
		

Crossrefs

Row sums give essentially A003945, A007283, or A042950.
Cf. A072406 for number of odd terms in each row.
Cf. A051597, A096646, A122218 (identical for n > 1).
Cf. A007318 (q=0), A072405 (q= -1), A173117 (q=1), A173118 (q=2), A173119 (q=3), A173120 (q=-4).

Programs

  • Magma
    T:= func< n,k | n lt 3 select 1 else Binomial(n,k) - Binomial(n-2,k-1) >;
    [T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Apr 28 2021
    
  • Mathematica
    t[2, 1] = 1; t[n_, n_] = t[, 0] = 1; t[n, k_] := t[n, k] = t[n-1, k-1] + t[n-1, k]; Table[t[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Nov 28 2013, after Ralf Stephan *)
  • PARI
    A072405(n, k) = if(n>2, binomial(n, k)-binomial(n-2, k-1), 1) \\ M. F. Hasler, Jan 06 2024
  • Sage
    def T(n,k): return 1 if n<3 else binomial(n,k) - binomial(n-2,k-1)
    flatten([[T(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Apr 28 2021
    

Formula

T(n, k) = C(n,k) - C(n-2,k-1) for n >= 3 and T(n, k) = 1 otherwise.
T(n, k) = T(n-1, k-1) + T(n-1, k) starting with T(2, 0) = T(2, 1) = T(2, 2) = 1 and T(n, 0) = T(n, n) = 1.
G.f.: (1-x^2*y) / (1 - x*(1+y)). - Ralf Stephan, Jan 31 2005
From G. C. Greubel, Apr 28 2021: (Start)
Sum_{k=0..n} T(n, k) = (n+1)*[n<3] + 3*2^(n-2)*[n>=3].
T(n, k, q) = q*[n=2] + Sum_{j=0..5} q^j*binomial(n-2*j, k-j)*[n>2*j] with T(n,0) = T(n,n) = 1 for q = -1. (End)

A106510 Expansion of (1+x)^2/(1+x+x^2).

Original entry on oeis.org

1, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1
Offset: 0

Views

Author

Paul Barry, May 04 2005

Keywords

Comments

Row sums of the Riordan array ((1+x)/(1+x+x^2),x/(1+x)), A106509.
Equals INVERT transform of (1, -2, 3, -4, 5, ...). - Gary W. Adamson, Oct 10 2008

Examples

			1 + x - x^2 + x^4 - x^5 + x^7 - x^8 + x^10 - x^11 + x^13 - x^14 + ...
		

Programs

Formula

a(n) = Sum_{k=0..n} Sum_{j=0..n-k} (-1)^j*binomial(2n-k-j, j)
a(n) = A049347(n-1) = A102283(n) if n >= 1. - R. J. Mathar, Aug 07 2011
From Michael Somos, Oct 15 2008: (Start)
Euler transform of length 3 sequence [ 1, -2, 1].
a(n) is multiplicative with a(3^e) = 0^e, a(p^e) = 1 if p == 1 (mod 3), a(p^e) = (-1)^e if p == 2 (mod 3).
G.f. A(x) satisfies 0=f(A(x), A(x^2)) where f(u, v) = 4 - 3*v - u * (4 - 2*v - u). (End)
a(-n) = a(n). a(n+3) = a(n) unless n = 0 or n = -3.
a(n) = Sum_{k=0..n} A128908(n,k)*(-1)^(n-k). - Philippe Deléham, Jan 22 2012

Extensions

Edited by M. F. Hasler, May 07 2018

A106511 Expansion of g.f. (1+x)^2/((1 + x + x^2)*(1 + x - x^2)).

Original entry on oeis.org

1, 0, 0, 0, 1, -2, 3, -4, 6, -10, 17, -28, 45, -72, 116, -188, 305, -494, 799, -1292, 2090, -3382, 5473, -8856, 14329, -23184, 37512, -60696, 98209, -158906, 257115, -416020, 673134, -1089154, 1762289, -2851444, 4613733, -7465176, 12078908, -19544084, 31622993
Offset: 0

Views

Author

Paul Barry, May 04 2005

Keywords

Comments

Diagonal sums of the Riordan array ((1+x)/(1+x+x^2), x/(1+x)), A106509.

Crossrefs

Programs

  • Magma
    I:=[1,0,0,0]; [n le 4 select I[n] else -2*Self(n-1)-Self(n-2)+Self(n-4): n in [1..50]]; // Vincenzo Librandi, Jan 12 2014
    
  • Mathematica
    CoefficientList[Series[(1 + x)^2/((1 + x + x^2)(1 + x - x^2)), {x, 0, 40}], x] (* Vincenzo Librandi, Jan 12 2014 *)
  • PARI
    a(n) = (fibonacci(1-n) + 1 - n%3) >> 1; \\ Kevin Ryde, Apr 29 2021
  • Sage
    def A005252(n): return sum( binomial(n-2*k, 2*k) for k in (0..n//4) )
    def A106511(n): return (-1)^n*( fibonacci(n-1) - A005252(n-2) )
    [A106511(n) for n in (0..45)] # G. C. Greubel, Apr 29 2021
    

Formula

a(n) = Sum_{k=0..floor(n/2)} Sum_{j=0..n-2k} (-1)^j*binomial(2n-3k-j, j).
a(n) = (1/2)*((-1)^n*Fibonacci(n) + Kronecker(-3,n)). - Ralf Stephan, Jun 02 2007
a(n) = -2*a(n-1) - a(n-2) + a(n-4), a(0)=1, a(1)=a(2)=a(3)=0. - Philippe Deléham, Jan 12 2014
a(n) = (-1)^n*(Fibonacci(n-1) - A005252(n-2)), n>=2. - Katharine Ahrens, May 05 2019
E.g.f.: exp(-x/2)*(15*cos(sqrt(3)*x/2) + 15*cosh(sqrt(5)*x/2) + 5*sqrt(3)*sin(sqrt(3)*x/2) + 3*sqrt(5)*sinh(sqrt(5)*x/2))/30. - Stefano Spezia, Oct 19 2023
Showing 1-3 of 3 results.