%I #23 Sep 08 2022 08:44:37
%S 0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,
%T 0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,
%U 0,5,0,5,0,5,0,5,0,5,0,5,0
%N Period 2: repeat [0, 5].
%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (0,1).
%F a(n) = 5/2*(1-(-1)^n) = 5*(n mod 2). - _Paolo P. Lava_, Oct 20 2006
%F G.f.: 5*x/((1-x)*(1+x)). - _R. J. Mathar_, Nov 21 2011
%F a(n) = a(n-2). - _Wesley Ivan Hurt_, Aug 19 2022
%t PadRight[{},120,{0,5}] (* _Harvey P. Dale_, Feb 18 2013 *)
%o (Magma) &cat [[0,5]^^50]; // _Bruno Berselli_, Dec 10 2015
%o (PARI) a(n)=n%2*5 \\ _Charles R Greathouse IV_, Jul 23 2016
%K nonn,easy
%O 0,2
%A _N. J. A. Sloane_.
|