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

A007825 Number of n step self-avoiding walks on 3 X infinity grid starting from (0,1).

Original entry on oeis.org

1, 4, 10, 22, 42, 90, 182, 382, 742, 1486, 2866, 5646, 10878, 21198, 40694, 78758, 151018, 291046, 557746, 1072050, 2053586, 3941038, 7547726, 14471102, 27711106, 53099670, 101675030, 194762778, 372916642, 714195242
Offset: 0

Views

Author

Lauren Williams (lwilliam(AT)MIT.EDU)

Keywords

Crossrefs

Cf. A302408 (starting from (0,0)), A038577, A001411.

Extensions

Title improved and more terms from Sean A. Irvine, Feb 02 2018

A302408 Number of n step self-avoiding walks on 3 X infinity grid starting from (0,0).

Original entry on oeis.org

1, 3, 7, 18, 40, 86, 170, 350, 688, 1394, 2702, 5338, 10278, 20078, 38578, 74820, 143496, 276890, 530626, 1020774, 1955400, 3754560, 7190520, 13790666, 26407852, 50612412, 96911566, 185660272, 355485362, 680860212, 1303623528, 2496462996
Offset: 0

Views

Author

Sean A. Irvine, Apr 07 2018

Keywords

Crossrefs

Cf. A007825 (starting from (0,1)), A038577, A001411.

A110935 a(n) = if n mod 2 = 0 then 8*F(n)-n otherwise 8*F(n)-4, where F() = Fibonacci numbers A000045.

Original entry on oeis.org

0, 4, 6, 12, 20, 36, 58, 100, 160, 268, 430, 708, 1140, 1860, 3002, 4876, 7880, 12772, 20654, 33444, 54100, 87564, 141666, 229252, 370920, 600196, 971118, 1571340, 2542460, 4113828, 6656290, 10770148, 17426440, 28196620, 45623062, 73819716, 119442780, 193262532
Offset: 0

Views

Author

N. J. A. Sloane, Sep 30 2007

Keywords

Comments

Number of self-avoiding walks on the strip {0,1} X Z.
Variant of A038577. [R. J. Mathar, Dec 13 2008]

Programs

  • Mathematica
    LinearRecurrence[{1, 3, -2, -3, 1, 1}, {0, 4, 6, 12, 20, 36}, 40] (* Jean-François Alcover, Jan 09 2019 *)
    Table[If[EvenQ[n],8Fibonacci[n]-n,8Fibonacci[n]-4],{n,0,40}] (* Harvey P. Dale, Jun 12 2019 *)
  • PARI
    a(n) = if (n % 2, 8*fibonacci(n)-4, 8*fibonacci(n)-n); \\ Michel Marcus, Sep 07 2015

Formula

G.f.: -2*x*(2*x^4-x^3-3*x^2+x+2) / ((x-1)^2*(x+1)^2*(x^2+x-1)). - Colin Barker, Mar 18 2013

A283240 Triangle read by rows: T(n,k) = number of directed self-avoiding walks (SAWs) of length k in an n-ladder graph that use all rows of the graph.

Original entry on oeis.org

2, 2, 0, 4, 8, 8, 0, 0, 4, 12, 20, 16, 0, 0, 0, 4, 16, 32, 40, 28, 0, 0, 0, 0, 4, 20, 48, 72, 72, 44, 0, 0, 0, 0, 0, 4, 24, 68, 120, 144, 120, 64, 0, 0, 0, 0, 0, 0, 4, 28, 92, 188, 264, 264, 188, 88, 0, 0, 0, 0, 0, 0, 0, 4, 32, 120, 280, 452, 528, 452, 280, 116
Offset: 1

Views

Author

Hector J. Partridge, Mar 03 2017

Keywords

Comments

n is the number of rows in the ladder graph, i.e., L_n.
k is the length of the directed SAWs. k = 0 represents the single nodes with no edges.
T(n,k) is the number of directed SAWs which use at least one node from every row.

Examples

			Triangle T(n,k) begins:
n/k 0  1  2   3   4   5   6   7    8     9  10   11   12    13    14    15    16    17   18   19
1   2  2
2   0  4  8   8
3   0  0  4  12  20  16
4   0  0  0   4  16  32  40  28
5   0  0  0   0   4  20  48  72   72   44
6   0  0  0   0   0   4  24  68  120  144  120   64
7   0  0  0   0   0   0   4  28   92  188  264  264  188    88
8   0  0  0   0   0   0   0   4   32  120  280  452  528   452   280   116
9   0  0  0   0   0   0   0   0    4   36  152  400  732   980   980   732   400   148
10  0  0  0   0   0   0   0   0    0    4   40  188  552  1132  1712  1960  1712  1132  552  184
e.g., there are T(3,3) = 12 directed SAWs of length 3 in L_3 that use at least one node from each row.
Six shapes walked in both directions.
>    _          _
>   |     |      |      |    |_      _|
>   |     |_     |     _|      |    |
		

Crossrefs

The sum of each columns is twice A038577.
The diagonal T(n,2n-1) are the number of directed Hamiltonian paths in the n-ladder graph A137882.
Primarily used to calculate the total number of directed SAWs of length k in an n-ladder A283241.

Programs

  • Python
    maxN=20
    Tnk=[[0 for column in range(0, row*2)] for row in range(0,maxN+1)]
    Tnk[1][0]=2 # initial values for the special case of 1-ladder.  Two single nodes.
    Tnk[1][1]=2 # SAW of length 1 on a L_1, either left or right
    for row in range(2,maxN+1):
        for column in range(0, row*2):
            if(column+1 < row):
                # path is smaller than ladder - no possible SAW using all rows
                Tnk[row][column] = 0
            elif(column+1 == row):
                # vertical SAW, 2 possible in 2 directions
                Tnk[row][column] = 4
            elif(column == row*2 -1):
                # n-ladder Hamiltonian A137882
                Tnk[row][column] = 2*(row*row - row + 2)
            elif(column == 2*(row-1)):
                # Grow SAW including Hamiltonians from previous row, 4 extra SAWs from Hamiltonians
                Tnk[row][column] = Tnk[row-1][column-1] + Tnk[row-1][column-2] + 4
            else:
                # Grow SAW from previous SAWs. Either adding one or two edges
                Tnk[row][column] = Tnk[row-1][column-1] + Tnk[row-1][column-2]
    print(Tnk)

Formula

T(n,k) = 0 when k+1 < n
T(n,k) = 4 when k+1 = n
T(n,k) = 2(n^2-n+2) when k = 2n-1
T(n,k) = T(n-1,k-1) + T(n-1,k-2) + 4 when k = 2n-2
T(n,k) = T(n-1,k-1) + T(n-1,k-2) otherwise

A336769 Table read by antidiagonals: T(h,n) is the number of n-step self avoiding walks on a 2D square grid confined to an infinite strip of height h where the walk starts at the origin.

Original entry on oeis.org

3, 6, 3, 12, 7, 3, 20, 18, 7, 3, 36, 40, 19, 7, 3, 58, 86, 48, 19, 7, 3, 100, 170, 120, 49, 19, 7, 3, 160, 350, 274, 130, 49, 19, 7, 3, 268, 688, 620, 326, 131, 49, 19, 7, 3, 430, 1394, 1346, 810, 338, 131, 49, 19, 7, 3, 708, 2702, 2972, 1912, 884, 339, 131, 49, 19, 7, 3
Offset: 1

Views

Author

Scott R. Shannon, Aug 04 2020

Keywords

Examples

			T(1,3) = 12. The six 3-step walks taking a first step to the right or a first step upward followed by a step to the right are:
.
                  +  +--+     +--+  +--+--+  +--+
                  |     |     |     |        |  |
+--+--+--+  +--+--+  +--+  +--+     +        +  +
.
The same steps can be taken to the left, giving a total of 2*6 = 12 walks.
.
The table begins:
.
3 6 12 20  36  58 100  160  268   430   708   1140   1860   3002    4876    7880...
3 7 18 40  86 170 350  688 1394  2702  5338  10278  20078  38578   74820  143496...
3 7 19 48 120 274 620 1346 2972  6402 13994  29870  64412 136308  291008  612920...
3 7 19 49 130 326 810 1912 4486 10262 23634  53642 122624 276524  627248 1405154...
3 7 19 49 131 338 884 2228 5560 13438 32320  76440 181202 425138 1001128 2336886...
3 7 19 49 131 339 898 2328 6050 15320 38478  94642 231798 560794 1357098 3258148...
3 7 19 49 131 339 899 2344 6180 16040 41572 105806 267560 666682 1655140 4070280...
3 7 19 49 131 339 899 2345 6198 16204 42586 110636 286682 733032 1865008 4693178...
3 7 19 49 131 339 899 2345 6199 16224 42788 112016 293908 764248 1982070 5089002...
3 7 19 49 131 339 899 2345 6199 16225 42810 112260 295734 774682 2030988 5286652...
3 7 19 49 131 339 899 2345 6199 16225 42811 112284 296024 777042 2045610 5360672...
3 7 19 49 131 339 899 2345 6199 16225 42811 112285 296050 777382 2048600 5380646...
3 7 19 49 131 339 899 2345 6199 16225 42811 112285 296051 777410 2048994 5384370...
3 7 19 49 131 339 899 2345 6199 16225 42811 112285 296051 777411 2049024 5384822...
3 7 19 49 131 339 899 2345 6199 16225 42811 112285 296051 777411 2049025 5384854...
3 7 19 49 131 339 899 2345 6199 16225 42811 112285 296051 777411 2049025 5384855...
...
		

Crossrefs

Cf. A116903 (h->infinity), A038577 (h=1), A302408 (h=2), A001411, A038373.

Formula

For n <= h, T(h,n) = A116903(n).
Row 1 = T(1,n) = A038577(n).
Row 2 = T(2,n) = A302408(n).

A107069 Number of self-avoiding walks of length n on an infinite triangular prism starting at the origin.

Original entry on oeis.org

1, 4, 12, 34, 90, 222, 542, 1302, 3058, 7186, 16714, 38670, 89358, 205710, 472906, 1086138, 2491666, 5713318, 13094950, 30003190, 68731010, 157423986, 360530346, 825626942, 1890615518, 4329196974, 9912914314, 22698017834, 51972012258, 119000208806
Offset: 0

Views

Author

Jonathan Vos Post, May 10 2005

Keywords

Comments

The discrete space in which the walking happens is a triangular prism infinite in both directions along the x-axis. One vertex is the root, the origin. The basis is the set of single-step vectors, which we abbreviate as l (left), r (right), c (one step "clockwise" around the triangle) and c- (one step counterclockwise, more properly denoted c^-1).

Examples

			a(0) = 1, as there is one self-avoiding walk of length 0, namely the null-walk (the walk whose steps are the null set).
a(1) = 4 because (using the terminology in the Comment), the 4 possible 1-step walks are W_1 = {l,r,c,c-}.
a(2) = 12 because the set of legal 2-step walks are {l^2, lc, lc-, r^2, rc, rc-, c^2, cl, cr, c^-2, c-l, c-r}.
a(3) = 34 because we have every W_2 concatenated with {l,r,c,c-} except for those with immediate violations (lr etc.) and those two which go in a triangle {c^3, c^-3}; hence a(3) = 3*a(2) - 2 = 3*12 - 2 = 36 - 2 = 34.
		

Crossrefs

Programs

  • Python
    w = [[[(0, 0)]]]
    for n in range(1, 15):
        nw = []
        for walk in w[-1]:
            (x, t) = walk[-1]
            nss = [(x-1, t), (x+1, t), (x, (t+1)%3), (x, (t-1)%3)]
            for ns in nss:
                if ns not in walk:
                    nw.append(walk[:] + [ns])
        w.append(nw)
    print([len(x) for x in w])
    # Andrey Zabolotskiy, Sep 19 2019

Extensions

a(4) and a(5) corrected, a(6)-a(14) added by Andrey Zabolotskiy, Sep 19 2019
More terms from Andrey Zabolotskiy, Dec 04 2023
Showing 1-6 of 6 results.