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.

A118402 Row sums of triangle A118401.

Original entry on oeis.org

1, 1, 3, 1, 5, -1, 7, -3, 9, -5, 11, -7, 13, -9, 15, -11, 17, -13, 19, -15, 21, -17, 23, -19, 25, -21, 27, -23, 29, -25, 31, -27, 33, -29, 35, -31, 37, -33, 39, -35, 41, -37, 43, -39, 45, -41, 47, -43, 49, -45, 51, -47, 53, -49, 55, -51, 57, -53, 59, -55, 61, -57, 63, -59, 65, -61, 67, -63, 69, -65, 71
Offset: 0

Views

Author

Paul D. Hanna, Apr 27 2006

Keywords

Crossrefs

Programs

  • Maple
    a := n -> `if`(n=1, 1, (5+(-1)^n*(2*n-3))/2);
    seq(a(n), n=0..70); # Peter Luschny, Aug 04 2014
  • Mathematica
    Join[{1, 1}, LinearRecurrence[{-1, 1, 1}, {3, 1, 5}, 70]] (* Jean-François Alcover, Jun 13 2019 *)
  • PARI
    {a(n)=polcoeff((1+2*x+2*x^2)*(1+x^2)/(1+x+x*O(x^n))^2/(1-x),n,x)}

Formula

G.f.: (1+2*x+2*x^2)*(1+x^2)/(1+x)^2/(1-x).
a(n^2-n+2) = A118403(n).
a(2n) = 2n+1, a(2n+1) = 3-2n, n>0. - Ralf Stephan, Aug 18 2013
a(n) = (5+(-1)^n*(2*n-3))/2 for n>1. - Peter Luschny, Aug 04 2014