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.

A186537 G.f.: Sum( x^k/(1-2*x+x^k), k=1..oo).

Original entry on oeis.org

0, 1, 2, 4, 7, 12, 20, 34, 58, 101, 178, 318, 574, 1046, 1920, 3548, 6593, 12312, 23092, 43480, 82154, 155716, 295984, 564050, 1077400, 2062311, 3955186, 7598756, 14622318, 28179338, 54379520, 105071498, 203254164, 393607534, 763001000, 1480458656, 2875091021, 5588152920, 10869906136
Offset: 0

Views

Author

N. J. A. Sloane, Feb 23 2011

Keywords

Comments

This arose while studying the properties of A079500.

Crossrefs

First differences give A079500.

Programs

  • Maple
    add( x^k/(1-2*x+x^k), k=1..61); series(%,x,60); seriestolist(%);
    # second Maple program:
    b:= proc(n, m) option remember; `if`(n=0, 1,
          `if`(m=0, add(b(n-j, j), j=1..n),
          add(b(n-j, min(n-j, m)), j=1..min(n, m))))
        end:
    a:= proc(n) a(n):= `if`(n=0, 0, b(n-1, 0)+a(n-1)) end:
    seq(a(n), n=0..40);  # Alois P. Heinz, May 01 2014
  • Mathematica
    b[n_, m_] := b[n, m] = If[n == 0, 1, If[m == 0, Sum[b[n-j, j], {j, 1, n}], Sum[b[n-j, Min[n-j, m]], {j, 1, Min[n, m]}]]]; a[n_] := If[n == 0, 0, b[n-1, 0] + a[n-1]]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, May 05 2014, after Alois P. Heinz *)

Formula

G.f.: -(1+x^2+ 1/(x-1) )/(1-x)*( 1 + x*(x-1)^3*(1-x+x^3)/( Q(0)- x*(x-1)^3*(1-x+x^3)) ), where Q(k) = (x+1)*(2*x-1)*(1-x)^2 + x^(k+2)*(x+x^2+x^3-2*x^4-1 - x^(k+3) + x^(k+5)) - x*(-1+2*x-x^(k+3))*(1-2*x+x^2+x^(k+4)-x^(k+5))*(-1+4*x-5*x^2+2*x^3 - x^(k+2)- x^(k+5) + 2*x^(k+3) - x^(2*k+5) + x^(2*k+6))/Q(k+1) ; (continued fraction). - Sergei N. Gladkovskii, Dec 14 2013