A131028 Periodic sequence (7, 4, 1, 1, 4, 7).
7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1
Offset: 1
Links
- Index entries for linear recurrences with constant coefficients, signature (2,-2,1).
Crossrefs
Programs
-
Magma
m:=105; [ [7, 4, 1, 1, 4, 7][(n-1) mod 6 + 1]: n in [1..m] ];
-
Mathematica
PadRight[{},120,{7,4,1,1,4,7}] (* Harvey P. Dale, Jul 15 2013 *)
-
PARI
{m=105; for(n=1, m, r=(n-1)%6; print1(if(r==0||r==5, 7, if(r==1||r==4, 4, 1)), ","))}
Formula
a(1) = a(6) = 7, a(2) = a(5) = 4, a(3) = a(4) = 1; for n > 6, a(n) = a(n-6).
G.f.: x*(7-10*x+7*x^2)/((1-x)*(1-x+x^2)).
a(n) = A084104(n+2).
a(n) = 4+2*sqrt(3)*cos(Pi/6*(2*n-1)). - Werner Schulte, Jul 21 2017
Comments