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-3 of 3 results.

A001668 Number of self-avoiding n-step walks on honeycomb lattice.

Original entry on oeis.org

1, 3, 6, 12, 24, 48, 90, 174, 336, 648, 1218, 2328, 4416, 8388, 15780, 29892, 56268, 106200, 199350, 375504, 704304, 1323996, 2479692, 4654464, 8710212, 16328220, 30526374, 57161568, 106794084, 199788408, 372996450, 697217994, 1300954248
Offset: 0

Views

Author

Keywords

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A006851.

Programs

  • Maple
    a:= proc(n) local v, b;
          if n<2 then return 1 +2*n fi;
          v:= proc() false end: v(0, 0), v(1, 0):= true$2;
          b:= proc(n, x, y) local c;
                if v(x, y) then 0
              elif n=0 then 1
              else v(x, y):= true;
                   c:= b(n-1, x+1, y) + b(n-1, x-1, y) +
                       b(n-1, x, y-1+2*((x+y) mod 2));
                   v(x, y):= false; c
                fi
              end;
          6*b(n-2, 1, 1)
        end:
    seq(a(n), n=0..20);  # Alois P. Heinz, Jul 07 2011
  • Mathematica
    a[n_] := a[n] = Module[{v, b}, If[n < 2 , Return[1+2*n]]; v[0, 0] = v[1, 0] = True; v[, ] = False; b[m_, x_, y_] := Module[{c}, If[v[x, y], 0 , If[ m == 0 , 1, v[x, y] = True; c = b[m-1, x+1, y] + b[m-1, x-1, y] + b[m-1, x, y-1 + 2*Mod[x+y, 2]]; v[x, y] = False; c]]]; 6*b[n-2, 1, 1]]; Table[Print["a(", n, ") = ", a[n]]; a[n], {n, 0, 32}] (* Jean-François Alcover, Nov 25 2013, translated from Alois P. Heinz's Maple program *)

Formula

mu^n <= a(n) <= mu^n alpha^sqrt(n) for mu = A179260 and some alpha. It has been conjectured that a(n) ~ mu^n * n^(11/32). - Charles R Greathouse IV, Nov 08 2013

Extensions

More terms from Pab Ter (pabrlos(AT)yahoo.com), May 06 2004

A006817 Trails of length n on square lattice.

Original entry on oeis.org

1, 4, 12, 36, 108, 316, 916, 2628, 7500, 21268, 60092, 169092, 474924, 1329188, 3715244, 10359636, 28856252, 80220244, 222847804, 618083972, 1713283628, 4742946484, 13123882524, 36274940740, 100226653420, 276669062116, 763482430316, 2105208491748, 5803285527724
Offset: 0

Views

Author

Keywords

Comments

A trail is a path which may cross itself but does not reuse an edge. This sequence counts directed paths on the square lattice.

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Undirected trails-rotation and reflection are counted by A001997.

Extensions

More terms from David W. Wilson, Jul 20 2001
More terms from Bert Dobbelaere, Jan 19 2019

A192871 Number of n-step prudent self-avoiding walks on honeycomb lattice.

Original entry on oeis.org

1, 3, 6, 12, 24, 48, 90, 168, 318, 594, 1092, 2004, 3678, 6720, 12210, 22128, 40074, 72372, 130380, 234432, 421128, 755208, 1352328, 2418246, 4320552, 7709898, 13744764, 24477618, 43560444, 77448330, 137602440, 244277016, 433399824, 768379830, 1361530134
Offset: 0

Views

Author

Alois P. Heinz, Jul 11 2011

Keywords

Comments

A prudent walk never takes a step pointing towards a vertex it has already visited. Prudent walks are self-avoiding but not reversible in general.

Examples

			This 8-step prudent self-avoiding walk on honeycomb lattice from (S) to (E) is not reversible:
.           o...o       o...o
.          .     .     .     .
.     o...o       4---3       o
.    .     .     /     \     .
.   o       6---5       2...o
.    .     /     .     /     .
.     o...7      (S)--1       o
.    .     \     .     .     .
.   o      (E)..o       o...o
.    .     .     .     .
.     o...o       o...0
		

Crossrefs

Programs

  • Maple
    i:= n-> max(n, 0)+1: d:= n-> max(n-1, -1):
    b:= proc(n, x, y, z, u, v, w) option remember;
        `if`(n=0, 1, `if`(x>y, b(n, y, x, w, v, u, z),
        `if`(min(y, z)<=0 or x=-1,
            b(n-1, d(y), d(z), u, i(v), i(w), x), 0)+
        `if`(min(w, x)<=0 or y=-1,
            b(n-1, d(w), d(x), y, i(z), i(u), v), 0)))
        end:
    a:= n-> `if`(n<2, 1 +2*n, 6*b(n-2, -1, -1, 1, 2, 1, -1)):
    seq(a(n), n=0..20);
  • Mathematica
    i[n_] := Max[n, 0] + 1; d[n_] := Max[n - 1, -1];
    b[n_, x_, y_, z_, u_, v_, w_] := b[n, x, y, z, u, v, w] = If[n == 0, 1, If[x > y, b[n, y, x, w, v, u, z], If[Min[y, z] <= 0 || x == -1, b[n - 1, d[y], d[z], u, i[v], i[w], x], 0] + If[Min[w, x] <= 0 || y == -1, b[n - 1, d[w], d[x], y, i[z], i[u], v], 0]]];
    a[n_] := If[n < 2, 1 + 2 n, 6 b[n - 2, -1, -1, 1, 2, 1, -1]];
    a /@ Range[0, 34] (* Jean-François Alcover, Sep 22 2019, after Alois P. Heinz *)
Showing 1-3 of 3 results.