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.

A117907 Expansion of x + (1-x)^2/(1-x^6).

This page as a plain text file.
%I A117907 #20 Sep 08 2022 08:45:24
%S A117907 1,-1,1,0,0,0,1,-2,1,0,0,0,1,-2,1,0,0,0,1,-2,1,0,0,0,1,-2,1,0,0,0,1,
%T A117907 -2,1,0,0,0,1,-2,1,0,0,0,1,-2,1,0,0,0,1,-2,1,0,0,0,1,-2,1,0,0,0,1,-2,1
%N A117907 Expansion of x + (1-x)^2/(1-x^6).
%C A117907 Diagonal sums of A117906.
%H A117907 G. C. Greubel, <a href="/A117907/b117907.txt">Table of n, a(n) for n = 0..1000</a>
%H A117907 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (-1,-1,-1,-1,-1).
%F A117907 G.f.: (1 +x^2 +x^3 +x^4 +x^5 +x^6)/(1 +x +x^2 +x^3 +x^4 +x^5).
%F A117907 a(n) = floor((5*n-1)/3) mod 2 - 3*[(n mod 6) = 1], n >= 2, with a(0) = 1, a(1) = -1. - _G. C. Greubel_, Oct 20 2021
%t A117907 (* From _Harvey P. Dale_, Nov 29 2013 *)
%t A117907 CoefficientList[Series[x+(1-x)^2/(1-x^6), {x,0,90}], x]
%t A117907 Join[{1,-1}, LinearRecurrence[{-1,-1,-1,-1,-1}, {1,0,0,0,1}, 90]]
%t A117907 PadRight[{1,-1}, 90, {1,-2,1,0,0,0}] (* End *)
%o A117907 (Magma) R<x>:=PowerSeriesRing(Integers(), 90); Coefficients(R!( x + (1-x)^2/(1-x^6) )); // _G. C. Greubel_, Oct 20 2021
%o A117907 (Sage)
%o A117907 def A117907(n): return (-1)^n if (n<2) else (((5*n-1)//3)%2) - 3*bool(n%6==1)
%o A117907 [A117907(n) for n in (0..90)] # _G. C. Greubel_, Oct 20 2021
%Y A117907 Cf. A088911, A117906.
%K A117907 easy,sign
%O A117907 0,8
%A A117907 _Paul Barry_, Apr 01 2006