# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a010675 Showing 1-1 of 1 %I A010675 #27 Sep 08 2022 08:44:37 %S A010675 0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4, %T A010675 0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4, %U A010675 0,4,0,4,0,4,0,4,0,4,0,4,0 %N A010675 Period 2: repeat (0,4). %H A010675 Index entries for linear recurrences with constant coefficients, signature (0,1). %F A010675 a(n) = 2*(1-(-1)^n); a(n) = 4*(n mod 2) - _Paolo P. Lava_, Oct 20 2006 %F A010675 O.g.f.: -2/(1+x)-2/(x-1). - _R. J. Mathar_, Feb 19 2008 %F A010675 a(n) = 4*(1+floor((n+1)/2)-ceiling((n+1)/2)). - _Wesley Ivan Hurt_, May 21 2013 %F A010675 a(n) = 4*cos( Pi*(n+1)/2 )^2. - _Wesley Ivan Hurt_, May 21 2013 %o A010675 (Magma) &cat [[0,4]^^50]; // _Bruno Berselli_, Dec 10 2015 %o A010675 (PARI) a(n)=n%2*4 \\ _Charles R Greathouse IV_, Jul 23 2016 %K A010675 nonn,easy %O A010675 0,2 %A A010675 _N. J. A. Sloane_. # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE