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.

Showing 1-2 of 2 results.

A277358 Number of self-avoiding planar walks starting at (0,0), ending at (n,0), remaining in the first quadrant and using steps (0,1), (1,0), (1,1), (-1,1), and (1,-1).

Original entry on oeis.org

1, 2, 9, 58, 491, 5142, 64159, 929078, 15314361, 283091122, 5799651689, 130423248378, 3193954129651, 84607886351462, 2410542221526399, 73500777054712438, 2388182999073694001, 82374234401380995042, 3006071549433968619529, 115713455097715665452858
Offset: 0

Views

Author

Alois P. Heinz, Oct 10 2016

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> n!*coeff(series(exp(-x/2)/(1-2*x)^(5/4), x, n+1), x, n):
    seq(a(n), n=0..25);
    # second Maple program:
    a:= proc(n) option remember; `if`(n<2, n+1,
           2*n*a(n-1) +(n-1)*a(n-2))
        end:
    seq(a(n), n=0..25);
  • Mathematica
    a[n_] := a[n] = If[n < 2, n+1, 2*n*a[n-1] + (n-1)*a[n-2]];
    Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Mar 29 2017, translated from Maple *)

Formula

E.g.f.: exp(-x/2)/(1-2*x)^(5/4).
a(n) = 2*n*a(n-1) + (n-1)*a(n-2) for n>1, a(0)=1, a(1)=2.
a(n) ~ sqrt(Pi) * 2^(n+5/2) * n^(n+3/4) / (Gamma(1/4) * exp(n+1/4)). - Vaclav Kotesovec, Oct 13 2016

A320512 Total number of nodes summed over all self-avoiding planar walks starting at (0,0), ending at (n,0), remaining in the first quadrant and using steps (0,1), (1,0), (1,1), (-1,1), and (1,-1) such that (0,1) is never used directly before or after (1,0) or (1,1).

Original entry on oeis.org

1, 5, 31, 258, 2702, 33821, 492978, 8198218, 153136209, 3173544162, 72241986729, 1791612993205, 48074653669593, 1387590910289915, 42863756641047136, 1410904918289665343, 49296029555617568097, 1822020250023113834772, 71023629427964322798782
Offset: 0

Views

Author

Alois P. Heinz, Oct 22 2018

Keywords

Crossrefs

Cf. A317985.

Programs

  • Maple
    b:= proc(x, y, i) option remember; (l-> `if`(min(x, y)<0, 0,
          `if`(max(x, y)=0, [1$2], add(`if`({i, j} in {{1, 2}, {3, 5},
           {4, 5}}, 0, (p-> p+[0, p[1]])(b(x-l[j][1], y-l[j][2], j))),
           j=1..5))))([[-1, 1], [1, -1], [1, 1], [1, 0], [0, 1]])
        end:
    a:= n-> b(n, 0$2)[2]:
    seq(a(n), n=0..20);
  • Mathematica
    b[x_, y_, i_] := b[x, y, i] = With[{l = {{-1, 1}, {1, -1}, {1, 1}, {1, 0}, {0, 1}}}, If[Min[x, y] < 0, {0, 0}, If[Max[x, y] == 0, {1, 1}, Sum[If[ MemberQ[{{1, 2}, {3, 5}, {4, 5}}, Sort@{i, j}], {0, 0}, Function[p, p + {0, p[[1]]}][b[x - l[[j]][[1]], y - l[[j]][[2]], j]]], {j, 5}]]]];
    a[n_] := b[n, 0, 0][[2]];
    a /@ Range[0, 20] (* Jean-François Alcover, May 14 2020, after Maple *)

Formula

a(n) ~ c * n! * 2^n * n^(7/4), where c = 0.1758027947... - Vaclav Kotesovec, May 14 2020
Showing 1-2 of 2 results.