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 A363524 #23 Aug 06 2023 08:16:33 %S A363524 1,1,2,0,-4,-4,-8,0,16,16,32,0,-64,-64,-128,0,256,256,512,0,-1024, %T A363524 -1024,-2048,0,4096,4096,8192,0,-16384,-16384,-32768,0,65536,65536, %U A363524 131072,0,-262144,-262144,-524288,0,1048576,1048576,2097152,0,-4194304,-4194304 %N A363524 a(n) = 0 if 4 divides n + 1, otherwise (-1)^floor((n + 1) / 4) * 2^floor(n / 2). %C A363524 We call chen(n) = 1 / a(n) if a(n) != 0 and otherwise 0, the Chen sequence, after Kwang-Wu Chen (see link). Note how this sequence is used in the computation of the Swiss-Knife polynomials A153641. %H A363524 Winston de Greef, <a href="/A363524/b363524.txt">Table of n, a(n) for n = 0..6603</a> %H A363524 Kwang-Wu Chen, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL4/CHEN/AlgBE2.html">Algorithms for Bernoulli numbers and Euler numbers</a>, J. Integer Sequences, 4 (2001), #01.1.6. %H A363524 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,-4). %F A363524 a(n) = [x^n] (2*x^2 + x + 1) / (4*x^4 + 1). %F A363524 a(n) = A016116(n) * A046978(n + 1). %p A363524 a := n -> if irem(n + 1, 4) = 0 then 0 else (-1)^iquo(n + 1, 4) * 2^iquo(n, 2) fi: %p A363524 seq(a(n), n = 0..49); %p A363524 # Alternative: %p A363524 gf := (2*x^2 + x + 1)/(4*x^4 + 1): ser := series(gf, x, 24): %p A363524 seq(coeff(ser, x, n), n = 0..20); %t A363524 A363524list[nmax_]:=LinearRecurrence[{0,0,0,-4},{1,1,2,0},nmax+1];A363524list[100] (* _Paolo Xausa_, Aug 06 2023 *) %o A363524 (SageMath) %o A363524 def a(n): return 0 if 4.divides(n + 1) else (-1)^((n + 1) // 4) * 2^(n // 2) %o A363524 print([a(n) for n in range(45)]) %o A363524 (PARI) a(n)=if(n % 4 == 3, 0, (-1)^((n + 1) \ 4) * 2^(n \ 2)) \\ _Winston de Greef_, Jun 30 2023 %Y A363524 Cf. A153641, A016116, A046978. %K A363524 sign,easy %O A363524 0,3 %A A363524 _Peter Luschny_, Jun 17 2023