%I #29 Dec 12 2023 09:31:50
%S 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,
%T 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,
%U 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
%N Periodic sequence with period 1,5,3.
%C Continued fraction expansion of (7+sqrt(145))/16. - _Klaus Brockhaus_, Apr 28 2010
%C Decimal expansion of 17/111. - _R. J. Mathar_, Aug 05 2013
%C This is also the periodic unsigned Schick sequence for 7. See the Schick reference, p. 158 for p = 7 (the row labels should there be q_j, j >= 0). - _Wolfdieter Lang_, Apr 03 2020
%D 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.
%H <a href="/index/Rec">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,1).
%F G.f.: ( -1-5*x-3*x^2 ) / ( (x-1)*(1+x+x^2) ). - _R. J. Mathar_, Aug 05 2013
%F a(n) = 5 - 2 * mod(n+2,3). - _Wesley Ivan Hurt_, Mar 15 2014
%p A130794:=n->5 - 2 * ((n+2) mod 3); seq(A130794(n), n=0..100); # _Wesley Ivan Hurt_, Mar 15 2014
%t Table[5 - 2 Mod[n + 2, 3], {n, 0, 100}] (* _Wesley Ivan Hurt_, Mar 15 2014 *)
%t PadRight[{},120,{1,5,3}] (* _Harvey P. Dale_, Jun 15 2019 *)
%o (PARI) a(n)=[1,5,3][n%3+1] \\ _Charles R Greathouse IV_, Jun 02 2011
%Y Cf. A176908 (decimal expansion of (7+sqrt(145))/16). - _Klaus Brockhaus_, Apr 28 2010
%K nonn,easy,less
%O 0,2
%A _Paul Curtz_, Jul 15 2007