%I #32 Dec 14 2023 05:18:15
%S 1,3,5,5,3,1,1,3,5,5,3,1,1,3,5,5,3,1,1,3,5,5,3,1,1,3,5,5,3,1,1,3,5,5,
%T 3,1,1,3,5,5,3,1,1,3,5,5,3,1,1,3,5,5,3,1,1,3,5,5,3,1,1,3,5,5,3,1,1,3,
%U 5,5,3,1,1,3,5,5,3,1,1,3,5,5,3,1,1,3,5,5,3,1
%N Period 6: repeat [1, 3, 5, 5, 3, 1].
%C a(n) = A162699(n+1) (Modd 7) = A204453(A162699(n+1)), n>=0, where the nonnegative members of the seven residue classes Mod 7 (not to be confused with mod 7), called [m] for m=0..6, are given in the array A113807, if there the last row, starting with 7 is taken as class [0] after adding a 0 in front. Here only the classes [1], [3] and [5] are relevant. For Modd n residue classes see a comment on A203571. [_Wolfdieter Lang_, Feb 09 2012]
%C Continued fractions expansion of (8+sqrt(905))/29 = 1.3132144107925.. - _R. J. Mathar_, Mar 08 2012
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (2,-2,1).
%F From _R. J. Mathar_, Oct 15 2014: (Start)
%F G.f.: ( 1+x+x^2 ) / ( (1-x)*(x^2-x+1) ).
%F a(n) = a(n-1) - a(n-2) + a(n-3) - a(n-4) + a(n-5) for n>4.
%F a(n) = 3 + 2*sin(Pi*n/3)/sqrt(3) - 2*cos(Pi*n/3).
%F a(n) = A001045(n+2) mod 6. (End)
%F From _Wesley Ivan Hurt_, Jun 29 2016: (Start)
%F a(n) = a(n-6) for n>5.
%F a(n) = 2*a(n-1) - 2*a(n-2) + a(n-3) for n>2. (End)
%e Modd 7 classes for positive odd numbers reduced mod 7: a(3)=5 because A162699(4)=9 (the fourth positive odd number not divisible by 7), and 9 is a member of the Modd 7 class [5] = {5,9,19,23,...}.
%e A162699: 1, 3, 5, 9, 11, 13, 15, 17, 19, 23, 25, 27,...
%e Modd 7: 1, 3, 5, 5, 3, 1, 1, 3, 5, 5, 3, 1,... [_Wolfdieter Lang_, Feb 09 2012]
%p A110551:=n->[1, 3, 5, 5, 3, 1][(n mod 6)+1]: seq(A110551(n), n=0..100); # _Wesley Ivan Hurt_, Jun 29 2016
%t PadRight[{}, 100, {1, 3, 5, 5, 3, 1}] (* _Wesley Ivan Hurt_, Jun 29 2016 *)
%o (Magma) &cat [[1, 3, 5, 5, 3, 1]^^30]; // _Wesley Ivan Hurt_, Jun 29 2016
%o (PARI) x='x+O('x^50); Vec((1+x+x^2)/((1-x)*(x^2-x+1))) \\ _G. C. Greubel_, Aug 31 2017
%Y Cf. A001045, A105198, A110549, A110550, A113807, A162699, A203571, A204453.
%K easy,nonn
%O 0,2
%A _Paul Barry_, Jul 26 2005