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.

A079757 Periodic sequence 1, 0, -2, 3, -2, 0, ...

This page as a plain text file.
%I A079757 #20 Mar 27 2024 21:26:31
%S A079757 1,0,-2,3,-2,0,1,0,-2,3,-2,0,1,0,-2,3,-2,0,1,0,-2,3,-2,0,1,0,-2,3,-2,
%T A079757 0,1,0,-2,3,-2,0,1,0,-2,3,-2,0,1,0,-2,3,-2,0,1,0,-2,3,-2,0,1,0,-2,3,
%U A079757 -2,0,1,0,-2,3,-2,0,1,0,-2,3,-2,0,1,0,-2,3,-2,0,1,0,-2,3,-2,0,1,0,-2,3,-2,0
%N A079757 Periodic sequence 1, 0, -2, 3, -2, 0, ...
%H A079757 G. C. Greubel, <a href="/A079757/b079757.txt">Table of n, a(n) for n = 0..10000</a>
%H A079757 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (-2,-2,-1).
%F A079757 a(n) = A057079(2*n+1) - (-1)^floor((2*n+1)/2).
%F A079757 G.f.: (1+2*x)/(1+2*x+2*x^2+x^3).
%F A079757 a(n) = -2*a(n-1) - 2*a(n-2) - a(n-3).
%F A079757 a(n) = |Real(2*(sqrt(3/4)*i - 1/2)^n - (-1)^n )|, where i = sqrt(-1). - _Ralf Stephan_, Mar 07 2003
%t A079757 PadRight[{}, 120, {1,0,-2,3,-2,0}] (* _G. C. Greubel_, Mar 27 2024 *)
%o A079757 (Magma) &cat[[1,0,-2,3,-2,0]: n in [0..20]]; // _G. C. Greubel_, Mar 27 2024
%o A079757 (SageMath)
%o A079757 def A079757(n): return [1,0,-2,3,-2,0][n%6]
%o A079757 [A079757(n) for n in range(121)] # _G. C. Greubel_, Mar 27 2024
%Y A079757 Cf. A057079.
%K A079757 easy,sign
%O A079757 0,3
%A A079757 Mario Catalani (mario.catalani(AT)unito.it), Jan 10 2003