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.

A100286 Expansion of (1+2*x^2-2*x^3+2*x^4)/(1-x+x^2-x^3+x^4-x^5).

This page as a plain text file.
%I A100286 #25 Jun 20 2024 22:01:55
%S A100286 1,1,2,0,0,2,1,1,2,0,0,2,1,1,2,0,0,2,1,1,2,0,0,2,1,1,2,0,0,2,1,1,2,0,
%T A100286 0,2,1,1,2,0,0,2,1,1,2,0,0,2,1,1,2,0,0,2,1,1,2,0,0,2,1,1,2,0,0,2,1,1,
%U A100286 2,0,0,2,1,1,2,0,0,2,1,1,2,0,0,2,1,1,2,0,0,2
%N A100286 Expansion of (1+2*x^2-2*x^3+2*x^4)/(1-x+x^2-x^3+x^4-x^5).
%C A100286 Period 6: repeat [1,1,2,0,0,2]. - _G. C. Greubel_, Feb 06 2023
%C A100286 Decimal expansion of 3394/30303. - _Elmo R. Oliveira_, May 11 2024
%H A100286 G. C. Greubel, <a href="/A100286/b100286.txt">Table of n, a(n) for n = 0..5000</a>
%H A100286 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,-1,1,-1,1).
%F A100286 a(n) = a(n-1) - a(n-2) + a(n-3) - a(n-4) + a(n-5).
%F A100286 a(n) = (1/6)*(6 + 3*cos(Pi*n/3) - 3*cos(2*Pi*n/3) + sqrt(3)*sin(Pi*n/3) - 3*sqrt(3)*sin(2*Pi*n/3)).
%F A100286 a(n) = mod(A100284(n), 3).
%F A100286 From _G. C. Greubel_, Feb 06 2023: (Start)
%F A100286 a(n) = a(n-6).
%F A100286 a(n) = (1/2)*(2 + A010892(n) - A049347(n) - 2*A049347(n-1)).
%F A100286 a(n) = 2 + (n mod 2)*(1 - (n-1 mod 3)) - (n+1 mod 3). (End)
%F A100286 a(n) = 1 + A131736(n). - _Elmo R. Oliveira_, Jun 20 2024
%t A100286 CoefficientList[Series[(1+2x^2-2x^3+2x^4)/(1-x+x^2-x^3+x^4-x^5),{x,0,100}],x] (* _Harvey P. Dale_, Mar 03 2019 *)
%t A100286 PadRight[{}, 120, {1,1,2,0,0,2}] (* _G. C. Greubel_, Feb 06 2023 *)
%o A100286 (Magma) [2 +(n mod 2)*(1-((n+2) mod 3)) -((n+1) mod 3): n in [0..100]]; // _G. C. Greubel_, Feb 06 2023
%o A100286 (SageMath)
%o A100286 def A100286(n): return 2 +(n%2)*(1-((n-1)%3)) -((n+1)%3)
%o A100286 [A100286(n) for n in range(101)] # _G. C. Greubel_, Feb 06 2023
%Y A100286 Cf. A010892, A049347, A100284, A131736.
%K A100286 easy,nonn
%O A100286 0,3
%A A100286 _Paul Barry_, Nov 11 2004