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.

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).

A355021 a(n) = (-1)^n * A000032(n) - 1.

Original entry on oeis.org

1, -2, 2, -5, 6, -12, 17, -30, 46, -77, 122, -200, 321, -522, 842, -1365, 2206, -3572, 5777, -9350, 15126, -24477, 39602, -64080, 103681, -167762, 271442, -439205, 710646, -1149852, 1860497, -3010350, 4870846, -7881197, 12752042, -20633240, 33385281
Offset: 0

Views

Author

Clark Kimberling, Jun 21 2022

Keywords

Comments

There are the partial sums of L(1) - L(2) + L(3) - L(4) + L(5) - ... .
Closely related (Fibonacci, A000045) partial sums of F(1) - F(2) + F(3) - F(4) + F(5) - ... are given by A355020.
Apart from signs, same as A098600 and A181716.

Examples

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

Crossrefs

Programs

  • Magma
    [Lucas(-n) -1: n in [0..50]]; // G. C. Greubel, Mar 17 2024
    
  • Mathematica
    f[n_] := Fibonacci[n]; g[n_] := LucasL[n];
    f1 = Table[(-1)^n f[n] + 1, {n, 0, 40}]   (* A355020 *)
    g1 = Table[(-1)^n g[n] - 1, {n, 0, 40}]   (* this sequence *)
    LucasL[-Range[0, 50]] - 1 (* G. C. Greubel, Mar 17 2024 *)
    LinearRecurrence[{0,2,-1},{1,-2,2},40] (* Harvey P. Dale, Sep 06 2024 *)
  • SageMath
    [lucas_number2(-n,1,-1) -1 for n in range(51)] # G. C. Greubel, Mar 17 2024

Formula

a(n) = 2*a(n-2) - a(n-3) for n >= 3. [Corrected by Georg Fischer, Sep 30 2022]
G.f.: (1 - 2*x)/(1 - 2*x^2 + x^3).

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