A154870 Period 6: repeat [7, 5, 1, -7, -5, -1].
7, 5, 1, -7, -5, -1, 7, 5, 1, -7, -5, -1, 7, 5, 1, -7, -5, -1, 7, 5, 1, -7, -5, -1, 7, 5, 1, -7, -5, -1, 7, 5, 1, -7, -5, -1, 7, 5, 1, -7, -5, -1, 7, 5, 1, -7, -5, -1, 7, 5, 1, -7, -5, -1, 7, 5, 1, -7, -5, -1, 7, 5, 1, -7, -5, -1, 7, 5, 1, -7, -5, -1, 7, 5, 1, -7, -5, -1, 7, 5, 1, -7, -5, -1, 7, 5, 1
Offset: 0
Links
- Holly Krieger and Brady Haran, A Fascinating Thing about Fractions, Numberphile video, Dec 15 2019.
- Index entries for linear recurrences with constant coefficients, signature (0,0,-1).
Programs
-
Magma
&cat [[7, 5, 1, -7, -5, -1]^^20]; // Wesley Ivan Hurt, Jun 20 2016
-
Maple
A154870:=n->[7, 5, 1, -7, -5, -1][(n mod 6)+1]: seq(A154870(n), n=0..100); # Wesley Ivan Hurt, Jun 20 2016
-
Mathematica
PadRight[{}, 100, {7, 5, 1, -7, -5, -1}] (* Wesley Ivan Hurt, Jun 20 2016 *)
Formula
a(n) = -a(n-3) for n>2; G.f.: (7+5*x+x^2)/((1+x)*(1-x+x^2)). [R. J. Mathar, Jan 23 2009]
a(n) = cos(n*Pi) + 6*cos(n*Pi/3) + 2*sqrt(3)*sin(n*Pi/3). - Wesley Ivan Hurt, Jun 20 2016
Extensions
Edited and extended by R. J. Mathar, Jan 23 2009
Comments