(MAGMAMagma) I:=[0, 4, 6, 7]; [n le 4 select I[n] else Self(n-1)+Self(n-3)-Self(n-4): n in [1..70]]; // Vincenzo Librandi, Apr 26 2012
(MAGMAMagma) I:=[0, 4, 6, 7]; [n le 4 select I[n] else Self(n-1)+Self(n-3)-Self(n-4): n in [1..70]]; // Vincenzo Librandi, Apr 26 2012
proposed
approved
editing
proposed
<a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,1,-1).
From Colin Barker, Mar 13 2012: (Start)
a(n) = a(n-1)+a(n-3)-a(n-4). G.f.: x*(4+2*x+x^2)/((1-x)^2*(1+x+x^2)). [_Colin Barker_, Mar 13 2012]
a(n) = a(n-1) + a(n-3) - a(n-4) for n>4. (End)
a(n) = sum_Sum_{i=1..n} 2^(-i mod 3). - Wesley Ivan Hurt, Jul 08 2014
From Wesley Ivan Hurt, Jun 10 2016: (Start)
a(n) = (21*n-12+3*cos(2*n*Pi/3)-5*sqrt(3)*sin(2*n*Pi/3))/9.
a(3k) = 7k-1, a(3k-1) = 7k-3, a(3k-2) = 7k-7. (End)
A047289:=n->(21*n-12+3*cos(2*n*Pi/3)-5*sqrt(3)*sin(2*n*Pi/3))/9: seq(A047289(n), n=1..100); # Wesley Ivan Hurt, Jun 10 2016
Select[Range[0, 125], MemberQ[{0, 4, 6}, Mod[#, 7]]&] (* Vincenzo Librandi, Apr 26 2012 *)
approved
editing
<a href="/index/Rec">Index to sequences with entries for linear recurrences with constant coefficients</a>, signature (1,0,1,-1).
<a href="/index/Rec">Index entries for to sequences related to with linear recurrences with constant coefficients</a>, signature (1,0,1,-1).
<a href="/index/Rea#recLCCRec">Index entries for sequences related to linear recurrences with constant coefficients</a>, signature (1,0,1,-1).
reviewed
approved
proposed
reviewed
editing
proposed