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.

A099838 Expansion of (1-x)^2*(1+x)/(1+x+x^2).

This page as a plain text file.
%I A099838 #21 Apr 21 2023 09:23:33
%S A099838 1,-2,0,3,-3,0,3,-3,0,3,-3,0,3,-3,0,3,-3,0,3,-3,0,3,-3,0,3,-3,0,3,-3,
%T A099838 0,3,-3,0,3,-3,0,3,-3,0,3,-3,0,3,-3,0,3,-3,0,3,-3,0,3,-3,0,3,-3,0,3,
%U A099838 -3,0,3,-3,0,3,-3,0,3,-3,0,3,-3,0,3,-3,0,3,-3,0,3,-3,0,3,-3,0,3,-3,0,3,-3,0,3,-3,0,3,-3,0,3,-3,0,3,-3,0
%N A099838 Expansion of (1-x)^2*(1+x)/(1+x+x^2).
%H A099838 G. C. Greubel, <a href="/A099838/b099838.txt">Table of n, a(n) for n = 0..1000</a>
%H A099838 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (-1,-1).
%F A099838 a(n) = Sum_{k=0..n} (-1)^k*( cos(2*Pi*(n-k)/3) + sin(2*Pi*(n-k)/3)/sqrt(3) )*C(2, k).
%F A099838 a(n) = 2*sqrt(3)*cos((4*n+1)*Pi/6) for n>=2. - _Richard Choulet_, Apr 23 2009
%F A099838 a(n) = 3*A049347(n) - 2*[n=0] + [n=1]. - _G. C. Greubel_, Apr 21 2023
%t A099838 LinearRecurrence[{-1,-1}, {1,-2,0,3}, 100] (* _Jean-François Alcover_, Jan 02 2022 *)
%o A099838 (Magma) [1,-2] cat [3*(n+1 -3*Floor((n+2)/3)): n in [2..110]]; // _G. C. Greubel_, Apr 21 2023
%o A099838 (SageMath) [3*(n+1) -9*((n+2)//3) -2*int(n==0) +int(n==1) for n in range(111)] # _G. C. Greubel_, Apr 21 2023
%Y A099838 Partial sums are A099837.
%Y A099838 Cf. A049347.
%K A099838 easy,sign
%O A099838 0,2
%A A099838 _Paul Barry_, Oct 27 2004