%I M3772 #35 Sep 08 2022 08:44:35
%S 0,5,8,8,2,3,5,2,9,4,1,1,7,6,4,7,0,5,8,8,2,3,5,2,9,4,1,1,7,6,4,7,0,5,
%T 8,8,2,3,5,2,9,4,1,1,7,6,4,7,0,5,8,8,2,3,5,2,9,4,1,1,7,6,4,7,0,5,8,8,
%U 2,3,5,2,9,4,1,1,7,6,4,7,0,5,8,8,2,3,5
%N Decimal expansion of 1/17.
%C Period 16: repeat [0, 5, 8, 8, 2, 3, 5, 2, 9, 4, 1, 1, 7, 6, 4, 7]. - _Joerg Arndt_, Mar 25 2013
%D H. Rademacher and O. Toeplitz, Von Zahlen und Figuren (Springer 1930, reprinted 1968), ch. 19, 'Die periodischen Dezimalbrueche'. [From _Reinhard Zumkeller_, Oct 06 2008]
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H Vincenzo Librandi, <a href="/A007450/b007450.txt">Table of n, a(n) for n = 0..5000</a>
%H R. K. Hoeflin, <a href="http://www.eskimo.com/~miyaguch/mega.html">Mega Test</a>
%H <a href="/index/Rec#order_09">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,0,0,0,0,-1,1).
%F From _Reinhard Zumkeller_, Oct 06 2008: (Start)
%F A028416(4)=17; A002371(A049084(17)) = A002371(7)=16;
%F a(n+16) = a(n), a(n+16/2) = 9 - a(n). (End)
%F G.f.: -x*(7*x^7-3*x^6+2*x^5+x^4-6*x^3+3*x+5)/((x-1)*(x^8+1)). - _Colin Barker_, Aug 15 2012
%t CoefficientList[Series[-x (7 x^7 - 3 x^6 + 2 x^5 + x^4 - 6 x^3 + 3 x + 5)/((x - 1) (x^8+1)), {x, 0, 100}], x] (* _Vincenzo Librandi_, Mar 25 2013 *)
%o (Magma) I:=[0, 5, 8, 8, 2, 3, 5, 2, 9]; [n le 9 select I[n] else Self(n-1)-Self(n-8)+Self(n-9): n in [1..100]]; // _Vincenzo Librandi_, Mar 25 2013
%o (PARI) a(n)=[0,5,8,8,2,3,5,2,9,4,1,1,7,6,4,7][n%16+1]; /* _Joerg Arndt_, Mar 25 2013 */
%K cons,nonn,easy
%O 0,2
%A _N. J. A. Sloane_