login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A363524 a(n) = 0 if 4 divides n + 1, otherwise (-1)^floor((n + 1) / 4) * 2^floor(n / 2). 2
1, 1, 2, 0, -4, -4, -8, 0, 16, 16, 32, 0, -64, -64, -128, 0, 256, 256, 512, 0, -1024, -1024, -2048, 0, 4096, 4096, 8192, 0, -16384, -16384, -32768, 0, 65536, 65536, 131072, 0, -262144, -262144, -524288, 0, 1048576, 1048576, 2097152, 0, -4194304, -4194304 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
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.
LINKS
Kwang-Wu Chen, Algorithms for Bernoulli numbers and Euler numbers, J. Integer Sequences, 4 (2001), #01.1.6.
FORMULA
a(n) = [x^n] (2*x^2 + x + 1) / (4*x^4 + 1).
a(n) = A016116(n) * A046978(n + 1).
MAPLE
a := n -> if irem(n + 1, 4) = 0 then 0 else (-1)^iquo(n + 1, 4) * 2^iquo(n, 2) fi:
seq(a(n), n = 0..49);
# Alternative:
gf := (2*x^2 + x + 1)/(4*x^4 + 1): ser := series(gf, x, 24):
seq(coeff(ser, x, n), n = 0..20);
MATHEMATICA
A363524list[nmax_]:=LinearRecurrence[{0, 0, 0, -4}, {1, 1, 2, 0}, nmax+1]; A363524list[100] (* Paolo Xausa, Aug 06 2023 *)
PROG
(SageMath)
def a(n): return 0 if 4.divides(n + 1) else (-1)^((n + 1) // 4) * 2^(n // 2)
print([a(n) for n in range(45)])
(PARI) a(n)=if(n % 4 == 3, 0, (-1)^((n + 1) \ 4) * 2^(n \ 2)) \\ Winston de Greef, Jun 30 2023
CROSSREFS
Sequence in context: A057377 A145811 A131772 * A304877 A147980 A021493
KEYWORD
sign,easy
AUTHOR
Peter Luschny, Jun 17 2023
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 1 04:42 EDT 2024. Contains 372148 sequences. (Running on oeis4.)