%I #17 Sep 08 2022 08:46:18
%S 1,3,5,7,5,3,1,1,3,5,7,5,3,1,1,3,5,7,5,3,1,1,3,5,7,5,3,1,1,3,5,7,5,3,
%T 1,1,3,5,7,5,3,1,1,3,5,7,5,3,1,1,3,5,7,5,3,1,1,3,5,7,5,3,1,1,3,5,7,5,
%U 3,1,1,3,5,7,5,3,1,1,3,5,7,5,3,1,1,3
%N Period 7: repeat [1, 3, 5, 7, 5, 3, 1].
%H Colin Barker, <a href="/A279321/b279321.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,0,1).
%F a(n) = abs(2n + 1 - 14*round((2n + 1)/14)).
%F a(n) = (25 + 2*( ((n+1) mod 7) + ((n+2) mod 7) + ((n+3) mod 7) - ((n+4) mod 7) - ((n+5) mod 7) - ((n+6) mod 7) ))/7. - _Wesley Ivan Hurt_, Dec 23 2016
%F From _Colin Barker_, Mar 21 2019: (Start)
%F G.f.: (1 + 2*x + x^2 + x^3)*(1 + x + 2*x^2 + x^3) / ((1 - x)*(1 + x + x^2 + x^3 + x^4 + x^5 + x^6)).
%F a(n) = a(n-7) for n>6.
%F (End)
%p A279321:=n->[1, 3, 5, 7, 5, 3, 1, 1][(n mod 7)+1]: seq(A279321(n), n=0..100); # _Wesley Ivan Hurt_, Dec 23 2016
%t PadRight[{}, 120, {1, 3, 5, 7, 5, 3, 1}] (* _Vincenzo Librandi_, Dec 10 2016 *)
%t With[{k = 14}, Table[Abs[2 n + 1 - k Round[(2 n + 1)/k]], {n, 0, 120}]] (* _Michael De Vlieger_, Dec 10 2016 *)
%o (Magma) &cat[[1, 3, 5, 7, 5, 3, 1]: n in [0..10]];
%o (PARI) Vec((1 + 2*x + x^2 + x^3)*(1 + x + 2*x^2 + x^3) / ((1 - x)*(1 + x + x^2 + x^3 + x^4 + x^5 + x^6)) + O(x^85)) \\ _Colin Barker_, Mar 21 2019
%Y Bisection of A279313.
%K nonn,easy
%O 0,2
%A _Wesley Ivan Hurt_, Dec 09 2016