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.

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

This page as a plain text file.
%I A355019 #17 Mar 22 2024 17:43:30
%S A355019 1,0,3,2,6,4,11,8,19,14,32,24,53,40,87,66,142,108,231,176,375,286,608,
%T A355019 464,985,752,1595,1218,2582,1972,4179,3192,6763,5166,10944,8360,17709,
%U A355019 13528,28655,21890,46366,35420,75023,57312,121391,92734,196416,150048
%N A355019 Partial sums of L(1) - F(1) + L(2) - F(2) + L(3) - F(3) + ..., where L = A000032 and F = A000045.
%C A355019 The closely related partial sums of F(1) - L(1) + F(2) - L(2) + F(3) - L(3) + ... are given by A355018.
%H A355019 G. C. Greubel, <a href="/A355019/b355019.txt">Table of n, a(n) for n = 0..1000</a>
%H A355019 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,-1,1,-1).
%F A355019 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).
%F A355019 a(n) = a(n-1) + a(n-2) - a(n-3) + a(n-4) - a(n-5) for n >= 5.
%F A355019 G.f.: (1 - x + 2*x^2)/((1 - x)*(1 - x^2 - x^4)).
%F A355019 From _G. C. Greubel_, Mar 17 2024: (Start)
%F A355019 a(n) = (1/2)*Sum_{j=0..n} ( (1+(-1)^j)*Lucas(floor(j/2) +1) - (1-(-1)^j) *Fibonacci(floor((j+1)/2)) ).
%F A355019 a(n) = (1/2)*( (1+(-1)^n)*Fibonacci(floor(n/2) +4) + 2*(1-(-1)^n)* Fibonacci(floor((n+3)/2)) ) - 2. (End)
%e A355019 a(0) = 1
%e A355019 a(1) = 1 - 1 = 0
%e A355019 a(2) = 1 - 1 + 3 = 3
%e A355019 a(3) = 1 - 1 + 3  - 1 = 2.
%t A355019 f[n_] := Fibonacci[n]; g[n_] := LucasL[n];
%t A355019 f1[n_] := If[OddQ[n], 2 - 2 f[(n + 3)/2], 2 - f[(n + 2)/2]]
%t A355019 f2 = Table[f1[n], {n, 0, 20}]  (* A355018 *)
%t A355019 g1[n_] := If[OddQ[n], -2 + 2 f[(n + 3)/2], -2 + f[(n + 8)/2]]
%t A355019 g2 = Table[g1[n], {n, 0, 20}]  (* this sequence *)
%t A355019 LinearRecurrence[{1,1,-1,1,-1}, {1,0,3,2,6}, 61] (* _G. C. Greubel_, Mar 17 2024 *)
%o A355019 (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
%o A355019 (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
%Y A355019 Cf. A000032, A000045, A355018, A355020, A355021.
%K A355019 nonn,easy
%O A355019 0,3
%A A355019 _Clark Kimberling_, Jun 16 2022