Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #50 Dec 12 2023 07:45:32
%S 1,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,
%T 0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,1,
%U 0,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,1
%N Period 5: repeat [1,0,1,0,0].
%C Unsigned version of A105385; also partial sums of A156174.
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,1).
%F G.f.: (1+x^2)/(1-x^5) = (1+x^2)/((1-x)*(1+x+x^2+x^3+x^4)).
%F a(n) = a(-n+2) = (1/25)*(-4*(n mod 5) + ((n+1) mod 5) + 6*((n+2) mod 5) - 4*((n+3) mod 5) + 6*((n+4) mod 5)).
%F a(n) + a(n+1) + a(n+2) = A177706(n+4).
%F a(n) - a(n+2) + a(n+4) = A011658(n+2).
%F a(n) = ((n+4)^2 mod 5 + (n+4)^4 mod 5)/2. - _Gary Detlefs_, May 29 2012
%F a(n) = (2/5) * (1 + cos(2*(n-2)*Pi/5) + cos(4*(n-2)*Pi/5) + cos(2*n*Pi/5) + cos(4*n*Pi/5)). - _Wesley Ivan Hurt_, Sep 26 2018
%F a(n) = floor(((2*n-1) mod 5)/3). - _Wesley Ivan Hurt_, Apr 29 2020
%t PadRight[{},120,{1,0,1,0,0}] (* _Harvey P. Dale_, Dec 09 2012 *)
%o (Magma) &cat[[1,0,1,0,0]^^20];
%o (Magma) [((n+1) mod 5) mod 2: n in [0..100]]; // _Vincenzo Librandi_, Feb 18 2015
%o (PARI) a(n)=n%5==0 || n%5==2 \\ _Charles R Greathouse IV_, Oct 28 2011
%Y Cf. A079998. See A232990 for another version.
%Y Cf. A057354 (partial sums, without initial zeros).
%K nonn,easy
%O 0
%A _Bruno Berselli_, Oct 27 2011