A175921 Period 5: repeat [1, 2, 2, -1, 1].
1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1
Offset: 1
Links
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,1).
Programs
-
Mathematica
PadRight[{},120,{1,2,2,-1,1}] (* Harvey P. Dale, Dec 30 2016 *)
-
PARI
a(n)=[1,1,2,2,-1][n%5+1] \\ Charles R Greathouse IV, Mar 12 2017
Extensions
Edited by Joerg Arndt, Sep 16 2013
Comments