A177706 Period 5: repeat [1, 1, 1, 1, 2].
1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,1).
Programs
-
Magma
&cat[ [1, 1, 1, 1, 2]: k in [1..21] ];
-
Maple
A177706:=n->floor(6*(n+1)/5)-floor(6*n/5): seq(A177706(n), n=0..100); # Wesley Ivan Hurt, Jul 24 2014
-
Mathematica
Table[Floor[6 (n + 1)/5] - Floor[6 n/5], {n, 0, 100}] (* Wesley Ivan Hurt, Jul 24 2014 *)
Formula
a(n) = a(n-5) for n > 4; a(0) = 1, a(1) = 1, a(2) = 1, a(3) = 1, a(4) = 2.
G.f.: (1+x+x^2+x^3+2*x^4)/(1-x^5).
a(n) = A130782(n+3).
a(n) = floor((n+1)*6/5) - floor((n)*6/5). - Hailey R. Olafson, Jul 23 2014
a(n) = (2/5)*(3 + cos(4*(n-4)*Pi/5) + cos(2*(n+1)*Pi/5)). - Wesley Ivan Hurt, Oct 05 2018
a(n) = 2 - ((n+1)^4 mod 5). - Aaron J Grech, Aug 30 2024
Comments