A130794 Periodic sequence with period 1,5,3.
1, 5, 3, 1, 5, 3, 1, 5, 3, 1, 5, 3, 1, 5, 3, 1, 5, 3, 1, 5, 3, 1, 5, 3, 1, 5, 3, 1, 5, 3, 1, 5, 3, 1, 5, 3, 1, 5, 3, 1, 5, 3, 1, 5, 3, 1, 5, 3, 1, 5, 3, 1, 5, 3, 1, 5, 3, 1, 5, 3, 1, 5, 3, 1, 5, 3, 1, 5, 3, 1, 5, 3, 1, 5, 3, 1, 5, 3, 1, 5, 3, 1, 5, 3, 1, 5, 3, 1, 5, 3, 1, 5, 3, 1, 5, 3, 1, 5, 3, 1
Offset: 0
References
- Carl Schick, Trigonometrie und unterhaltsame Zahlentheorie, Bokos Druck, Zürich, 2003 (ISBN 3-9522917-0-6). Tables 3.1 to 3.10, for odd p = 3..113 (with gaps), pp. 158-166. Here p = 7.
Links
- Index entries for linear recurrences with constant coefficients, signature (0,0,1).
Crossrefs
Cf. A176908 (decimal expansion of (7+sqrt(145))/16). - Klaus Brockhaus, Apr 28 2010
Programs
-
Maple
A130794:=n->5 - 2 * ((n+2) mod 3); seq(A130794(n), n=0..100); # Wesley Ivan Hurt, Mar 15 2014
-
Mathematica
Table[5 - 2 Mod[n + 2, 3], {n, 0, 100}] (* Wesley Ivan Hurt, Mar 15 2014 *) PadRight[{},120,{1,5,3}] (* Harvey P. Dale, Jun 15 2019 *)
-
PARI
a(n)=[1,5,3][n%3+1] \\ Charles R Greathouse IV, Jun 02 2011
Formula
G.f.: ( -1-5*x-3*x^2 ) / ( (x-1)*(1+x+x^2) ). - R. J. Mathar, Aug 05 2013
a(n) = 5 - 2 * mod(n+2,3). - Wesley Ivan Hurt, Mar 15 2014
Comments