%I #20 Dec 14 2023 05:40:51
%S 0,0,2,4,7,5,2,4,7,5,2,4,7,5,2,4,7,5,2,4,7,5,2,4,7,5,2,4,7,5,2,4,7,5,
%T 2,4,7,5,2,4,7,5,2,4,7,5,2,4,7,5,2,4,7,5,2,4,7,5,2,4,7,5,2,4,7,5,2,4,
%U 7,5,2,4,7,5,2,4,7,5,2,4,7,5,2,4,7,5,2,4,7,5,2,4,7,5,2,4,7,5,2
%N Decimal expansion of 1/404.
%C After the first two terms, a(n) is periodic with period 4: repeat [2, 4, 7, 5]. - _Wesley Ivan Hurt_, Jul 10 2016
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,-1,1).
%F From _Wesley Ivan Hurt_, Jul 10 2016: (Start)
%F G.f.: x^2*(2+2*x+5*x^2)/(1-x+x^2-x^3).
%F a(n) = a(n-1) - a(n-2) + a(n-3) for n>4, a(n) = a(n-4) for n>5.
%F a(n) = (9 + 5*cos(n*Pi/2) + sin(n*Pi/2))/2 for n>1. (End)
%e 0.0024752475247524752475247...
%p Digits:=100: evalf(1/404); # _Wesley Ivan Hurt_, Jul 10 2016
%t Join[{0,0},RealDigits[1/404,10,120][[1]]] (* or *) PadRight[{0,0},120,{7,5,2,4}] (* _Harvey P. Dale_, May 18 2012 *)
%t CoefficientList[Series[x^2*(2 + 2*x + 5*x^2)/(1 - x + x^2 - x^3), {x, 0, 30}], x] (* _Wesley Ivan Hurt_, Jul 10 2016 *)
%o (Magma) [0,0] cat &cat [[2, 4, 7, 5]^^30]; // _Wesley Ivan Hurt_, Jul 10 2016
%K nonn,cons,easy
%O 0,3
%A _N. J. A. Sloane_