cp's OEIS Frontend

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.

A349554 a(n) = A054108(n) + 4*(-1)^n.

Original entry on oeis.org

1, 19, 51, 201, 723, 2709, 10161, 38459, 146297, 559135, 2145021, 8255579, 31861021, 123256499, 477823891, 1855782329, 7219352971, 28125910829, 109720617991, 428537256449, 1675561707271, 6557869020329, 25689734662771, 100720871774981, 395197661173123
Offset: 1

Views

Author

Clark Kimberling, Dec 30 2021

Keywords

Crossrefs

Programs

  • Mathematica
    s[0] = 1; s[n_] := Binomial[2 n + 2, n + 1] - s[n - 1];
    Table[s[n], {n, 0, 10}]; (* A054108 *)
    a[n_] := s[n] + 4*(-1)^n;
    Table[a[n], {n, 1, 30}] (* A349554 *)
  • PARI
    a(n) = (-1)^(n+1)*sum(k=0,n+1,(-1)^k*binomial(2*k,k)) + 4*(-1)^n; \\ Michel Marcus, Jan 19 2022
  • Python
    from math import comb
    def A349554(n): return (1 if n % 2 else -1)*(sum((-1 if k % 2 else 1)*comb(2*k,k) for k in range(n+2))-4) # Chai Wah Wu, Jan 19 2022
    

Formula

a(n) = C(2(n+1),n+1) - a(n-1) with a(1) = 1. - Chai Wah Wu, Jan 19 2022