login
A131289
Period 12: repeat 1, 1, 3, -3, -3, 1, -1, -1, -3, 3, 3, -1.
0
1, 1, 3, -3, -3, 1, -1, -1, -3, 3, 3, -1, 1, 1, 3, -3, -3, 1, -1, -1, -3, 3, 3, -1, 1, 1, 3, -3, -3, 1, -1, -1, -3, 3, 3, -1, 1, 1, 3, -3, -3, 1, -1, -1, -3, 3, 3, -1, 1, 1, 3, -3, -3, 1, -1, -1, -3, 3, 3, -1, 1, 1, 3, -3, -3, 1, -1, -1, -3, 3, 3, -1, 1, 1, 3, -3, -3, 1, -1, -1, -3, 3, 3, -1, 1, 1, 3, -3, -3, 1, -1, -1, -3, 3, 3, -1, 1, 1, 3, -3, -3, 1
OFFSET
0,3
COMMENTS
Nonsimple continued fraction of (41+sqrt(17))/26 = 1.7355040625237... - R. J. Mathar, Mar 08 2012
FORMULA
a(n) = 4*cos(Pi*n/6)/3 - 2*sin(Pi*n/6)/3 - 5*cos(Pi*n/2)/3 + 5*sin(Pi*n/2)/3 + 4*cos(5*Pi*n/6)/3 - 2*sin(5*Pi*n/6)/3.- R. J. Mathar, Oct 08 2011
a(0) = 1, a(1) = 1, a(2) = 3, a(3) = -3, a(4) = -3, a(5) = 1, a(n) = -a(n-6). - Harvey P. Dale, Sep 03 2012
MATHEMATICA
PadRight[{}, 120, {1, 1, 3, -3, -3, 1, -1, -1, -3, 3, 3, -1}] (* or *) LinearRecurrence[ {0, 0, 0, 0, 0, -1}, {1, 1, 3, -3, -3, 1}, 120] (* Harvey P. Dale, Sep 03 2012 *)
PROG
(PARI) a(n) = [1, 1, 3, -3, -3, 1, -1, -1, -3, 3, 3, -1][n%12+1]; \\ Jinyuan Wang, Feb 26 2020
CROSSREFS
Cf. A130974 ([1, 1, 1, 3, 3, 3]).
Sequence in context: A177693 A353631 A353641 * A130974 A064353 A190906
KEYWORD
sign,easy
AUTHOR
Paul Curtz, Sep 29 2007
EXTENSIONS
More terms from Olaf Voß, Feb 11 2008
STATUS
approved