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.

A100218 Riordan array ((1-2*x)/(1-x), (1-x)).

Original entry on oeis.org

1, -1, 1, -1, -2, 1, -1, 0, -3, 1, -1, 0, 2, -4, 1, -1, 0, 0, 5, -5, 1, -1, 0, 0, -2, 9, -6, 1, -1, 0, 0, 0, -7, 14, -7, 1, -1, 0, 0, 0, 2, -16, 20, -8, 1, -1, 0, 0, 0, 0, 9, -30, 27, -9, 1, -1, 0, 0, 0, 0, -2, 25, -50, 35, -10, 1, -1, 0, 0, 0, 0, 0, -11, 55, -77, 44, -11, 1, -1, 0, 0, 0, 0, 0, 2, -36, 105, -112, 54, -12, 1
Offset: 0

Views

Author

Paul Barry, Nov 08 2004

Keywords

Examples

			Triangle begins as:
   1;
  -1,  1;
  -1, -2,  1;
  -1,  0, -3,  1;
  -1,  0,  2, -4,  1;
  -1,  0,  0,  5, -5,   1;
  -1,  0,  0, -2,  9,  -6,   1;
  -1,  0,  0,  0, -7,  14,  -7,  1;
  -1,  0,  0,  0,  2, -16,  20, -8,  1;
  -1,  0,  0,  0,  0,   9, -30, 27, -9,  1;
		

Crossrefs

Row sums are A100219.
Matrix inverse of A100100.
Apart from signs, same as A098599.
Very similar to triangle A111125.

Programs

  • Magma
    A100218:= func< n,k | n eq 0 select 1 else (-1)^(n+k)*(Binomial(k,n-k) + Binomial(k-1,n-k-1)) >;
    [A100218(n,k): k in [0..n], n in [0..13]]; // G. C. Greubel, Mar 28 2024
    
  • Mathematica
    T[0,0]:= 1; T[1,1]:= 1; T[1,0]:= -1; T[n_, k_]:= T[n, k]= If[k<0 || k>n, 0, T[n- 1,k] +T[n-1,k-1] -2*T[n-2,k-1] +T[n-3,k-1]]; Table[T[n,k], {n,0,14}, {k,0,n} ]//Flatten (* G. C. Greubel, Mar 13 2017 *)
  • SageMath
    def A100218(n,k): return 1 if n==0 else (-1)^(n+k)*(binomial(k,n-k) + binomial(k-1,n-k-1))
    flatten([[A100218(n,k) for k in range(n+1)] for n in range(14)]) # G. C. Greubel, Mar 28 2024

Formula

Sum_{k=0..n} T(n, k) = A100219(n) (row sums).
Number triangle T(n, k) = (-1)^(n-k)*(binomial(k, n-k) + binomial(k-1, n-k-1)), with T(0, 0) = 1. - Paul Barry, Nov 09 2004
T(n,k) = T(n-1,k) + T(n-1,k-1) - 2*T(n-2,k-1) + T(n-3,k-1), T(0,0)=1, T(1,0)=-1, T(1,1)=1, T(n,k)=0 if k < 0 or if k > n. - Philippe Deléham, Jan 09 2014
From G. C. Greubel, Mar 28 2024: (Start)
T(n, n-1) = A000027(n), n >= 1.
T(n, n-2) = -A080956(n-1), n >= 2.
T(2*n, n) = A280560(n).
T(2*n-1, n) = A157142(n-1), n >= 1.
T(2*n+1, n) = -A000007(n) = A154955(n+2).
T(3*n, n) = T(4*n, n) = A000007(n).
Sum_{k=0..n} (-1)^k*T(n, k) = A355021(n).
Sum_{k=0..floor(n/2)} T(n-k, k) = (-1)^n*A098601(n).
Sum_{k=0..floor(n/2)} (-1)^k*T(n-k, k) = -1 + 2*A077961(n) + A077961(n-2). (End)
From Peter Bala, Apr 28 2024: (Start)
This Riordan array has the form ( x*h'(x)/h(x), h(x) ) with h(x) = x*(1 - x) and hence belongs to the hitting time subgroup of the Riordan group (see Peart and Woan for properties of this subgroup).
T(n,k) = [x^(n-k)] (1/c(x))^n, where c(x) = (1 - sqrt(1 - 4*x))/(2*x) is the g.f. of the Catalan numbers A000108. In general the (n, k)-th entry of the hitting time array ( x*h'(x)/h(x), h(x) ) has the form [x^(n-k)] f(x)^n, where f(x) = x/( series reversion of h(x) ). (End)

A355020 a(n) = (-1)^n * A000045(n) + 1.

Original entry on oeis.org

1, 0, 2, -1, 4, -4, 9, -12, 22, -33, 56, -88, 145, -232, 378, -609, 988, -1596, 2585, -4180, 6766, -10945, 17712, -28656, 46369, -75024, 121394, -196417, 317812, -514228, 832041, -1346268, 2178310, -3524577, 5702888, -9227464, 14930353, -24157816, 39088170
Offset: 0

Views

Author

Clark Kimberling, Jun 21 2022

Keywords

Comments

There are the partial sums of F(1) - F(2) + F(3) - F(4) + F(5) - ... .
Closely related (Lucas, A000032) partial sums of L(1) - L(2) + L(3) - L(4) + L(5) - ... are given by A355021.
Apart from signs, same as A008346 and A119282.

Examples

			a(0) = 1;
a(1) = 1 - 1 = 0;
a(2) = 1 - 1 + 2 = 2;
a(3) = 1 - 1 + 2 - 3 = -1.
		

Crossrefs

Programs

  • Magma
    [1 - Fibonacci(-n): n in [0..50]]; // G. C. Greubel, Mar 17 2024
    
  • Mathematica
    f[n_] := Fibonacci[n]; g[n_] := LucasL[n];
    Table[(-1)^n f[n] + 1, {n, 0, 40}]   (* this sequence *)
    Table[(-1)^n g[n] - 1, {n, 0, 40}]   (* A355021 *)
    1 - Fibonacci[-Range[0, 50]] (* G. C. Greubel, Mar 17 2024 *)
  • PARI
    a(n) = (-1)^n*fibonacci(n) + 1; \\ Michel Marcus, Jun 24 2022
    
  • SageMath
    [1 - fibonacci(-n) for n in range(51)] # G. C. Greubel, Mar 17 2024

Formula

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

A355018 Partial sums of F(1) - L(1) + F(2) - L(2) + F(3) - L(3) + ..., where F = A000045 and L = A000032.

Original entry on oeis.org

1, 0, 1, -2, 0, -4, -1, -8, -3, -14, -6, -24, -11, -40, -19, -66, -32, -108, -53, -176, -87, -286, -142, -464, -231, -752, -375, -1218, -608, -1972, -985, -3192, -1595, -5166, -2582, -8360, -4179, -13528, -6763, -21890, -10944, -35420, -17709, -57312, -28655
Offset: 0

Views

Author

Clark Kimberling, Jun 16 2022

Keywords

Comments

The closely related partial sums of L(1) - F(1) + L(2) - F(2) + L(3) - F(3) + .... are given by A355019.

Examples

			a(0) = 1
a(1) = 1 - 1 = 0
a(2) = 1 - 1 + 1 = 1
a(3) = 1 - 1 + 1 - 3 = -2.
		

Crossrefs

Programs

  • Magma
    F:=Fibonacci; [2 - (((n+1) mod 2)*F(Floor((n+2)/2)) + 2*(n mod 2)*F(Floor((n+3)/2))) : n in [0..60]]; // G. C. Greubel, Mar 17 2024
    
  • Mathematica
    f[n_] := Fibonacci[n]; g[n_] := LucasL[n];
    f1[n_] := If[OddQ[n], 2 - 2 f[(n + 3)/2], 2 - f[(n + 2)/2]]
    f2 = Table[f1[n], {n, 0, 20}]  (* this sequence *)
    g1[n_] := If[OddQ[n], -2 + 2 f[(n + 3)/2], -2 + f[(n + 8)/2]]
    g2 = Table[g1[n], {n, 0, 20}]  (* A355019 *)
    LinearRecurrence[{1,1,-1,1,-1}, {1,0,1,-2,0}, 61] (* G. C. Greubel, Mar 17 2024 *)
  • SageMath
    f=fibonacci; [2 - (((n+1)%2)*f(((n+2)//2)) +2*(n%2)*f((n+3)//2)) for n in range(61)] # G. C. Greubel, Mar 17 2024

Formula

a(n) = 2 - 2*F((n+3)/2) if n is odd, a(n) = 2 - F((n+2)/2) if n is even, where F = A000045 (Fibonacci numbers).
a(n) = a(n-1) + a(n-2) - a(n-3) + a(n-4) - a(n-5) for n >= 5.
G.f.: (1 - x - 2*x^3)/((1 - x)*(1 - x^2 - x^4)).
From G. C. Greubel, Mar 17 2024: (Start)
a(n) = (1/2)*Sum_{j=0..n} ( (1+(-1)^j)*Fibonacci(floor((j+3)/2)) - (1 - (-1)^j)*Lucas(floor((j+1)/2)) ).
a(n) = 2 - (1/2)*( (1+(-1)^n)*Fibonacci(floor((n+2)/2)) + 2*(1-(-1)^n)* Fibonacci(floor((n+3)/2)) ). (End)

A355019 Partial sums of L(1) - F(1) + L(2) - F(2) + L(3) - F(3) + ..., where L = A000032 and F = A000045.

Original entry on oeis.org

1, 0, 3, 2, 6, 4, 11, 8, 19, 14, 32, 24, 53, 40, 87, 66, 142, 108, 231, 176, 375, 286, 608, 464, 985, 752, 1595, 1218, 2582, 1972, 4179, 3192, 6763, 5166, 10944, 8360, 17709, 13528, 28655, 21890, 46366, 35420, 75023, 57312, 121391, 92734, 196416, 150048
Offset: 0

Views

Author

Clark Kimberling, Jun 16 2022

Keywords

Comments

The closely related partial sums of F(1) - L(1) + F(2) - L(2) + F(3) - L(3) + ... are given by A355018.

Examples

			a(0) = 1
a(1) = 1 - 1 = 0
a(2) = 1 - 1 + 3 = 3
a(3) = 1 - 1 + 3  - 1 = 2.
		

Crossrefs

Programs

  • Magma
    F:=Fibonacci; [(((n+1) mod 2)*F(Floor(n/2)+4) + 2*(n mod 2)*F(Floor((n+3)/2))) - 2: n in [0..60]]; // G. C. Greubel, Mar 17 2024
    
  • Mathematica
    f[n_] := Fibonacci[n]; g[n_] := LucasL[n];
    f1[n_] := If[OddQ[n], 2 - 2 f[(n + 3)/2], 2 - f[(n + 2)/2]]
    f2 = Table[f1[n], {n, 0, 20}]  (* A355018 *)
    g1[n_] := If[OddQ[n], -2 + 2 f[(n + 3)/2], -2 + f[(n + 8)/2]]
    g2 = Table[g1[n], {n, 0, 20}]  (* this sequence *)
    LinearRecurrence[{1,1,-1,1,-1}, {1,0,3,2,6}, 61] (* G. C. Greubel, Mar 17 2024 *)
  • SageMath
    f=fibonacci; [(((n+1)%2)*f((n//2)+4) +2*(n%2)*f((n+3)//2)) -2 for n in range(61)] # G. C. Greubel, Mar 17 2024

Formula

a(n) = -2 + 2 F((n+3)/2) if n is odd, a(n) = - 2 + F((n+8)/2) if n is even, where F = A000045 (Fibonacci numbers).
a(n) = a(n-1) + a(n-2) - a(n-3) + a(n-4) - a(n-5) for n >= 5.
G.f.: (1 - x + 2*x^2)/((1 - x)*(1 - x^2 - x^4)).
From G. C. Greubel, Mar 17 2024: (Start)
a(n) = (1/2)*Sum_{j=0..n} ( (1+(-1)^j)*Lucas(floor(j/2) +1) - (1-(-1)^j) *Fibonacci(floor((j+1)/2)) ).
a(n) = (1/2)*( (1+(-1)^n)*Fibonacci(floor(n/2) +4) + 2*(1-(-1)^n)* Fibonacci(floor((n+3)/2)) ) - 2. (End)
Showing 1-4 of 4 results.