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.

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

This page as a plain text file.
%I A355020 #24 Mar 17 2024 03:16:30
%S A355020 1,0,2,-1,4,-4,9,-12,22,-33,56,-88,145,-232,378,-609,988,-1596,2585,
%T A355020 -4180,6766,-10945,17712,-28656,46369,-75024,121394,-196417,317812,
%U A355020 -514228,832041,-1346268,2178310,-3524577,5702888,-9227464,14930353,-24157816,39088170
%N A355020 a(n) = (-1)^n * A000045(n) + 1.
%C A355020 There are the partial sums of F(1) - F(2) + F(3) - F(4) + F(5) - ... .
%C A355020 Closely related (Lucas, A000032) partial sums of L(1) - L(2) + L(3) - L(4) + L(5) - ... are given by A355021.
%C A355020 Apart from signs, same as A008346 and A119282.
%H A355020 G. C. Greubel, <a href="/A355020/b355020.txt">Table of n, a(n) for n = 0..1000</a>
%H A355020 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (0,2,-1).
%F A355020 a(n) = 2*a(n-2) - a(n-3) for n > 2.
%F A355020 G.f.: 1/(1 - 2*x^2 + x^3).
%e A355020 a(0) = 1;
%e A355020 a(1) = 1 - 1 = 0;
%e A355020 a(2) = 1 - 1 + 2 = 2;
%e A355020 a(3) = 1 - 1 + 2 - 3 = -1.
%t A355020 f[n_] := Fibonacci[n]; g[n_] := LucasL[n];
%t A355020 Table[(-1)^n f[n] + 1, {n, 0, 40}]   (* this sequence *)
%t A355020 Table[(-1)^n g[n] - 1, {n, 0, 40}]   (* A355021 *)
%t A355020 1 - Fibonacci[-Range[0, 50]] (* _G. C. Greubel_, Mar 17 2024 *)
%o A355020 (PARI) a(n) = (-1)^n*fibonacci(n) + 1; \\ _Michel Marcus_, Jun 24 2022
%o A355020 (Magma) [1 - Fibonacci(-n): n in [0..50]]; // _G. C. Greubel_, Mar 17 2024
%o A355020 (SageMath) [1 - fibonacci(-n) for n in range(51)] # _G. C. Greubel_, Mar 17 2024
%Y A355020 Cf. A000045, A008346, A119282, A355018, A355019, A355021.
%K A355020 sign,easy
%O A355020 0,3
%A A355020 _Clark Kimberling_, Jun 21 2022