This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A122461 #44 Jan 30 2023 11:11:38 %S A122461 0,0,0,0,2,2,2,2,4,4,4,4,6,6,6,6,8,8,8,8,10,10,10,10,12,12,12,12,14, %T A122461 14,14,14,16,16,16,16,18,18,18,18,20,20,20,20,22,22,22,22,24,24,24,24, %U A122461 26,26,26,26,28,28,28,28,30,30,30,30,32,32,32,32,34,34,34,34,36,36,36,36 %N A122461 Repetitions of even numbers four times. %C A122461 Number of roots of P(x) = 1 + x + x^2 + … + x^n in the right half-plane. - _Michel Lagneau_, Oct 30 2012 %H A122461 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,1,-1). %F A122461 a(n) = (Sum_{k=0..n} (k+1)*cos((n-k)*Pi/2))+1/4*(2*cos(n*Pi/2)+1+(-1)^n)-2. - _Paolo P. Lava_, May 15 2007 %F A122461 a(n) = 2*A002265(n) = 2*A180969(2,n). [_Adriano Caroli_, Nov 25 2010, corrected by _R. J. Mathar_, Nov 26 2010] %F A122461 G.f.: 2*x^4/(1-x-x^4+x^5). [_Bruno Berselli_, Oct 31 2012] %F A122461 a(n) = (-3+(-1)^n+2*i^((n-1)*n)+2*n)/4, where i=sqrt(-1). [_Bruno Berselli_, Oct 31 2012] %F A122461 a(n) = 2 * floor(n/4). - _Wesley Ivan Hurt_, Dec 06 2013 %F A122461 a(n) = (2*n-3+2*cos(n*Pi/2)+cos(n*Pi)+2*sin(n*Pi/2))/4. - _Wesley Ivan Hurt_, Oct 02 2017 %p A122461 with(numtheory): for n from 1 to 70 do:it:=0:y:=[fsolve(sum('x^i ', 'i'=0..n-1), x, complex)] : for m from 1 to nops(y) do : if Re(y[m]) > 0 then it:=it+1:else fi:od: printf(`%d, `,it):od: # _Michel Lagneau_, Oct 31 2012 %p A122461 A122461:=n->2*floor(n/4); seq(A122461(n), n=0..100); # _Wesley Ivan Hurt_, Dec 06 2013 %t A122461 Table[2 Floor[n/4], {n, 0, 100}] (* _Wesley Ivan Hurt_, Dec 06 2013 *) %t A122461 Table[PadRight[{},4,2n],{n,0,20}]//Flatten (* or *) LinearRecurrence[ {1,0,0,1,-1},{0,0,0,0,2},80] (* _Harvey P. Dale_, Mar 15 2020 *) %o A122461 (Python) %o A122461 def A122461(n): return n>>1&-2 # _Chai Wah Wu_, Jan 30 2023 %Y A122461 Cf. A002265, A092533, A180969. %K A122461 nonn,easy %O A122461 0,5 %A A122461 _Paolo P. Lava_ and _Giorgio Balzarotti_, Oct 20 2006