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.

A287765 Period 4: repeat [1, 3, 5, 3].

This page as a plain text file.
%I A287765 #30 Feb 07 2025 09:26:35
%S A287765 1,3,5,3,1,3,5,3,1,3,5,3,1,3,5,3,1,3,5,3,1,3,5,3,1,3,5,3,1,3,5,3,1,3,
%T A287765 5,3,1,3,5,3,1,3,5,3,1,3,5,3,1,3,5,3,1,3,5,3,1,3,5,3,1,3,5,3,1,3,5,3,
%U A287765 1,3,5,3,1,3,5,3,1,3,5,3,1,3,5,3,1,3,5,3,1,3,5,3,1,3,5,3,1,3,5,3,1,3,5,3,1
%N A287765 Period 4: repeat [1, 3, 5, 3].
%H A287765 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1, -1, 1).
%F A287765 G.f.: x * (3*x^2+2*x+1) / (1-x+x^2-x^3). [Corrected by _Georg Fischer_, May 19 2019]
%F A287765 a(n) = a(n-1) - a(n-2) + a(n-3) with a(1)=1, a(2)=3 and a(3)=5.
%F A287765 a(2n) = 3, a(4*n+1) = 1 and a(4*n+3) = 5.
%F A287765 a(n) = ((n+3) mod 4) + ((n+4) mod 4). - _Aaron J Grech_, Aug 30 2024
%t A287765 PadRight[{}, 105, {1, 3, 5, 3}]
%t A287765 CoefficientList[Series[(3 x^2 + 2 x + 1)/(-x^3 + x^2 - x + 1), {x, 0, 104}], x]
%t A287765 LinearRecurrence[{1, -1, 1}, {1, 3, 5}, 105]
%t A287765 RecurrenceTable[{a[n] == a[n - 1] - a[n - 2] + a[n - 3], a[1] == 1, a[2] == 3, a[3] == 5}, a, {n, 105}]
%t A287765 Table[{1, 3, 5, 3}, 10] // Flatten (* _Eric W. Weisstein_, Feb 07 2025 *)
%t A287765 Table[3 - 2 Sin[n Pi/2], {n, 20}] (* _Eric W. Weisstein_, Feb 07 2025 *)
%t A287765 3 - 2 Sin[Range[20] Pi/2] (* _Eric W. Weisstein_, Feb 07 2025 *)
%Y A287765 Inspired by the first difference of A108752.
%K A287765 nonn,easy
%O A287765 1,2
%A A287765 _Robert G. Wilson v_, May 31 2017