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.

Previous Showing 91-100 of 4476 results. Next

A334877 Number of self-avoiding walks on a 2-dimensional square lattice where the walk consists of steps with incrementing length from 1 to n.

Original entry on oeis.org

1, 4, 12, 36, 108, 324, 948, 2740, 7892, 22540, 64020, 181396, 511828, 1440652, 4045676, 11322732, 31615780, 88100644, 245143676, 681002276, 1888943100, 5233741636, 14484853148, 40043579596, 110590828396, 305133547724
Offset: 0

Views

Author

Scott R. Shannon, May 13 2020

Keywords

Comments

This sequence gives the number of self-avoiding walks on a 2-dimensional square lattice where the walk starts with a step length of 1 which then increments by 1 after each step up until the step length is n.
The first time a collision with a previous step can occur is for n = 6. This can occur in three different ways. For example a walk with steps of length 1,2 and 3 to the right, a step of length 4 upward, then a step of length 5 to the left. A step of length 6 downward would now result in a collision. Requiring six steps before a collision is in contrast to the standard 2D square lattice SAW of A001411 where a collision can occur on the fourth step.
Note that this sequence agrees with a SAW on the diamond lattice, A001394, for the first 7 terms, even though the seventh term here has some walks removed due to the above collision.

Examples

			a(1) = 4. These are the four directions one can step away from a point on a 2D square lattice.
a(2) = 12. These consist of the two following walks:
.
    *
    |        1     2
    . 2    *---*---.---*
    |
*---*
  1
.
The first walk can be taken in 8 different ways, the second in 4 ways, giving a total of 12 walks.
a(3) = 36. These consist of the following five walks:
.
    *                                                           *
    |                                                           |
    .              3                     3                      .
    | 3      *---.---.---*         *---.---.---*                | 3
    .                    |         |                            .
    |                    . 2       . 2                          |
    *                    |         |                *---*---.---*
    |                *---*     *---*                  1     2
    . 2                1         1
    |                                     *---*---.---*---.---.---*
*---*                                       1     2          3
  1
.
The first four can be taken in 8 different ways, while the last straight walk can be taken in 4 ways, giving a total of 36 walks. Notice it is not possible to form a collision from any of these walks by adding a step of length 4.
		

Crossrefs

A357857 Number of (open and closed) trails in the complete undirected graph on n labeled vertices.

Original entry on oeis.org

1, 4, 21, 232, 14425, 3653196, 17705858989, 261353065517776, 241809117107232026097
Offset: 1

Views

Author

Max Alekseyev, Oct 16 2022

Keywords

Comments

Trails are directed and pass through each (undirected) edge at most once in either of the two directions.

Crossrefs

Formula

a(n) = n * A357855(n) + n * (n-1) * A357856(n).

Extensions

a(9) from Bert Dobbelaere, Oct 17 2022

A362167 a(n) = the hypergraph Catalan number C_2(n).

Original entry on oeis.org

1, 1, 6, 57, 678, 9270, 139968, 2285073, 39871926, 739129374, 14521778820, 302421450474, 6687874784484, 157491909678168, 3961138908376692, 106663881061254465, 3078671632202791782, 95213375569840078422, 3149291101933230285924, 111073721303120881912686
Offset: 0

Views

Author

Peter Bala, Apr 10 2023

Keywords

Comments

Let m >= 1. The sequence of hypergraph Catalan numbers {C_m(n): n >= 0} is defined in terms of counting walks on trees, weighted by the orders of their automorphism groups. When m = 1 we get the sequence of Catalan numbers A000108. The present sequence is the case m = 2.
Let T(n) be the set of unlabeled trees on n vertices (see A000055). Let T be a tree in T(n+1), and let v be a vertex of T. Then an a(m,T)-tour beginning at v is a walk that begins and ends at v and traverses each edge of T exactly 2*m times. We denote by a(m,T)(v) the number of a(m,T)-tours beginning at v.
The hypergraph Catalan numbers C_m(n) are defined by C_m(n) = Sum_{trees T in T(n+1)} Sum_{vertices v in T} a(m,T)(v)/|Aut(T)|, where Aut(T) denotes the automorphism group of the tree T.
Gunnells gives several combinatorial interpretations of the hypergraph Catalan numbers, a method to compute their generating functions to arbitrary precision and some conjectural asymptotics.

Crossrefs

Programs

Formula

a(n) ~ e^(3/2) * 2^(n+1) * n!/sqrt(Pi*n) (conjectural).

Extensions

a(11) onwards from Andrew Howroyd, Jan 31 2024

A362172 a(n) = the hypergraph Catalan number C_7(n).

Original entry on oeis.org

1, 1, 3432, 141858288, 40309820014464, 53321581727982247680, 238681094467043912358445056, 2924960829706245011243295851200512, 84750120431280677998861681616641721991168, 5208807724759446156144077076658272647436908396544
Offset: 0

Views

Author

Peter Bala, Apr 10 2023

Keywords

Comments

Let m >= 1. The sequence of hypergraph Catalan numbers {C_m(n): n >= 0} is defined in terms of counting walks on trees, weighted by the orders of their automorphism groups. See Gunnells. When m = 1 we get the sequence of Catalan numbers A000108. The present sequence is the case m = 7.
Gunnells gives several combinatorial interpretations of the hypergraph Catalan numbers, a method to compute their generating functions to arbitrary precision and some conjectural asymptotics.

Crossrefs

Formula

a(n) ~ sqrt(7)/4 * (7^6/6!)^n * n!^6/(Pi*n)^3 (conjectural).

Extensions

a(7) onwards from Andrew Howroyd, Feb 01 2024

A001335 Number of n-step polygons on hexagonal lattice.

Original entry on oeis.org

1, 0, 0, 12, 24, 60, 180, 588, 1968, 6840, 24240, 87252, 318360, 1173744, 4366740, 16370700, 61780320, 234505140, 894692736, 3429028116, 13195862760, 50968206912, 197517813636, 767766750564, 2992650987408, 11694675166500, 45807740881032
Offset: 0

Views

Author

Keywords

Comments

A "polygon" is a self-avoiding walk from (0,0) to (0,0).
The hexagonal lattice is the familiar 2-dimensional lattice in which each point has 6 neighbors. This is sometimes called the triangular lattice.

References

  • A. J. Guttmann, personal communication.
  • 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

Equals 6*A003289(n-1), n > 2.
Cf. A001334.

Extensions

a(22)-a(25) computed from A003289 by Bert Dobbelaere, Jan 04 2019
a(26) from Bert Dobbelaere, Jan 15 2019

A001394 Number of n-step self-avoiding walks on diamond.

Original entry on oeis.org

1, 4, 12, 36, 108, 324, 948, 2796, 8196, 24060, 70188, 205284, 597996, 1744548, 5073900, 14774652, 42922452, 124814484, 362267652, 1052271732, 3051900516, 8857050204, 25671988020, 74449697484, 215677847460, 625096195404, 1810062340812, 5243388472212
Offset: 0

Views

Author

Keywords

Comments

Number of 2 X n binary matrices avoiding simultaneously the right-angled numbered polyomino patterns (ranpp) (00;1) and (01;1). An occurrence of a ranpp (xy;z) in a matrix A=(a(i,j)) is a triple (a(i1,j1), a(i1,j2), a(i2,j1)) where i1 < i2, j1 < j2 and these elements are in same relative order as those in the triple (x,y,z). - Sergey Kitaev, Nov 11 2004

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

Extensions

Edited and extended by Joseph Myers, Jul 21 2013
a(24)-a(27) from Sean A. Irvine, Nov 13 2017

A001413 Number of 2n-step self-avoiding cycles on the cubic lattice.

Original entry on oeis.org

0, 24, 264, 3312, 48240, 762096, 12673920, 218904768, 3891176352, 70742410800, 1309643747808, 24609869536800, 468270744898944, 9005391024862848, 174776445357365040, 3419171337633496704
Offset: 1

Views

Author

Keywords

Comments

Original name: Number of 2n-step polygons on the cubic lattice. "Polygons" suggests translation invariance, and/or independence of the starting point; those are counted in A001409. Here, two paths which start and end at the origin are counted as distinct if they have a different sequence of steps, even if their set of edges is the same modulo translations.
a(n) is the number of 2n-step closed self-avoiding paths on the cubic lattice. - Bert Dobbelaere, Jan 04 2019

References

  • B. D. Hughes, Random Walks and Random Environments, Oxford 1995, vol. 1, p. 462.
  • 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. A001409.
Cf. A010566 (for square lattice equivalent).
Cf. A002896 (without self-avoidance restriction).

Programs

  • Python
    def A001413(n): # For illustration; becomes slow for n >= 5.
        if not hasattr(A:=A001413, 'terms'): A.terms=[]; A.paths=((0,0,0),),
        while n > len(A.terms):
            for L in (0,1):
                new = []; cycles = 0
                for path in A.paths:
                    end = path[-1]
                    for i in (0,1,2):
                       for s in (1,-1):
                          t = tuple(end[j]if j!=i else end[j]+s for j in (0,1,2))
                          if t not in path: new.append(path+(t,))
                          elif L and t==path[0]: cycles += 1
                A.paths = new
            A.terms.append(cycles)
        return A.terms[n-1] if n > 1 else 0 # M. F. Hasler, Jun 17 2025

Formula

a(n) = 4*n*A001409(n). - Sean A. Irvine, Jul 27 2020

Extensions

a(11)-a(12) from Bert Dobbelaere, Jan 04 2019
a(13)-a(16) (using A001409) from Alois P. Heinz, Feb 28 2024
Name changed by M. F. Hasler, Jun 17 2025

A046661 Number of n-step self-avoiding walks on the square lattice with first step specified.

Original entry on oeis.org

1, 3, 9, 25, 71, 195, 543, 1479, 4067, 11025, 30073, 81233, 220375, 593611, 1604149, 4311333, 11616669, 31164683, 83779155, 224424291, 602201507, 1611140121, 4316653453, 11536599329, 30870338727, 82428196555, 220329372907
Offset: 1

Views

Author

Keywords

Comments

Used as the denominator for the mean square displacement of all different self-avoiding n-step walks in A078797. - Hugo Pfoertner, Dec 09 2002
Number of ways a toy snake with n segments can be bent without flipping the snake upside down. Each segment must be perpendicular or parallel with each adjacent segment. A "slither" is a way of writing down the configuration of a snake; starting from the tail, write down which direction the next segment is pointing (R for right, S for straight, L for left). E.g., a snake with 10 segments may have the valid slither RLRRLLRRL, but not RSRRSSLSL.

Crossrefs

Programs

  • Mathematica
    (* b = A001411 *) mo = Tuples[{-1, 1}, 2]; b[0] = 1; b[tg_, p_:{{0, 0}}] := b[tg, p] = Block[{e, mv = Complement[Last[p] + #& /@ mo, p]}, If[tg == 1, Length[mv], Sum[b[tg - 1, Append[p, e]], {e, mv}]]];
    a[n_] := b[n]/4;
    Table[an = a[n]; Print[an]; an, {n, 1, 16}] (* Jean-François Alcover, Nov 02 2018, after Giovanni Resta in A001411 *)

Formula

a(n) = A001411(n)/4 = A002900(n)/2.

A052141 Number of paths from (0,0) to (n,n) that always move closer to (n,n) (and do not pass (n,n) and backtrack).

Original entry on oeis.org

1, 3, 26, 252, 2568, 26928, 287648, 3112896, 34013312, 374416128, 4145895936, 46127840256, 515268544512, 5775088103424, 64912164888576, 731420783788032, 8259345993203712, 93443504499523584, 1058972245409005568, 12019152955622817792, 136599995048232747008
Offset: 0

Views

Author

N. J. A. Sloane, Jan 23 2000

Keywords

Comments

From Michel Marcus and Petros Hadjicostas, Jul 16 2020: (Start)
a(n) is the number of subdivisions of a 2 x n grid as defined in Robeva and Sun (2020). We have a(n) = A059576(n-1, n-1) for n >= 1 privided the latter is viewed as a square array (rather than a triangle).
In general, A059576(m-1, n-1) is the number of subdivisions of a 2-row grid with m points at the top row and n points at the bottom. (End)
The title condition is unclear: the path (0,0) -> (0,n) -> (n,n-1) -> (n,n) arguably meets the title condition but is not allowed, because steps with negative slope are proscribed. Steps must move east (slope 0) or have finite positive slope or move north (infinite slope). On the other hand, for lattice paths subject only to the condition that each successive point on the path is closer to the terminal point than its predecessor, see the question "Why are the numbers counting "ever-closer" lattice paths so round?" on the mathoverflow website. - David Callan, Nov 21 2021

References

  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Example 6.3.9.

Crossrefs

Main diagonal of A059576.
Column k=2 of A316674.

Programs

  • Magma
    [n eq 0 select 1 else 2^(n-1)*Evaluate(LegendrePolynomial(n), 3) : n in [0..40]]; // G. C. Greubel, May 21 2023
    
  • Mathematica
    a[0]=1; a[n_]:= Hypergeometric2F1[-n, n+1, 1, -1]*2^(n-1); Table[a[n], {n, 0, 19}] (* Jean-François Alcover, Feb 23 2012, after Jon Stadler *)
    Table[2^(n-1)*LegendreP[n,3] +Boole[n==0]/2, {n,0,40}] (* G. C. Greubel, May 21 2023 *)
    CoefficientList[Series[(1+1/Sqrt[1-12x+4x^2])/2,{x,0,30}],x] (* Harvey P. Dale, Mar 10 2024 *)
  • SageMath
    def A052141(n): return 2^(n-1)*gen_legendre_P(n,0,3) + int(n==0)/2
    [A052141(n) for n in range(41)] # G. C. Greubel, May 21 2023

Formula

G.f.: (1/2)*( 1 + 1/sqrt(1 - 12*x + 4*x^2) ).
a(n) = 2^(n-1) * A001850(n). - Jon Stadler (jstadler(AT)capital.edu), Apr 30 2003
D-finite with recurrence: n*a(n) = 6*(2*n-1)*a(n-1) - 4*(n-1)*a(n-2). - Vaclav Kotesovec, Oct 08 2012
a(n) ~ sqrt(8+6*sqrt(2))*(6+4*sqrt(2))^n/(8*sqrt(Pi*n)). - Vaclav Kotesovec, Oct 08 2012

A066534 Total number of walks with length > 0 in the Hasse diagram of a Boolean algebra of order n.

Original entry on oeis.org

0, 1, 6, 30, 152, 840, 5232, 37072, 297600, 2680704, 26812160, 294945024, 3539364864, 46011796480, 644165265408, 9662479226880, 154599668154368, 2628194359738368, 47307498477649920, 898842471080329216
Offset: 0

Views

Author

Peter Bertok (peter(AT)bertok.com), Jan 07 2002

Keywords

Comments

Let P(A) be the power set of an n-element set A. Then a(n) = the total number of ways to add 1 or more elements of A to each element x of P(A) where the elements to add are not elements of x and order of addition is important. - Ross La Haye, Nov 19 2007

Examples

			a(2) = 6 because (2! / 0! * 2^0) + (2! / 1! * 2^1) = 6
		

Crossrefs

Programs

  • Mathematica
    a[ n_ ] := n!Sum[ 2^k/k!, {k, 0, n-1} ]
    Table[n*Gamma[n, 2]*E^2, {n, 0, 19}] (* Ross La Haye, Oct 09 2005 *)

Formula

a(n) = n!*Sum_{i+j= 0} 1/(i!*j!). - Benoit Cloitre, Nov 01 2002
E.g.f.: x*exp(2*x)/(1-x). a(n) = n*(a(n-1)+2^(n-1)). - Vladeta Jovovic, Oct 29 2003
a(n) = Sum_{k=0..n-1} (n! / k!) * 2^k = Sum_{k=0..n-1} P(n, n-k) * 2^k = n! * Sum_{k=0..n-1} 2^k / k! = Sum_{k=1..n} P(n, k) * 2^(n-k) = sum of the n-th row of A090802 from column 1 on = A010842(n) - 2^n = n * A010842(n-1) = binomial transform of A007526 - Ross La Haye, Sep 15 2004
E.g.f.: x/U(0) where U(k) = 1 - 2*x/(2 - 4/(2 + (k+1)/U(k+1))); (continued fraction, 3-step). - Sergei N. Gladkovskii, Oct 18 2012
Conjecture: a(n) + (-n-4)*a(n-1) + 4*(n)*a(n-2) + 4*(-n+2)*a(n-3) = 0. - R. J. Mathar, Dec 04 2012
a(n) ~ n! * exp(2). - Vaclav Kotesovec, Jun 01 2013
Mathar's conjectural third-order recurrence above is an easy consequence of Jovovic's first-order recurrence a(n) = n*(a(n-1) + 2^(n-1)). - Peter Bala, Sep 23 2013

Extensions

Edited by Dean Hickerson, Jan 12 2002
Entry revised by Ross La Haye, Aug 18 2006
Previous Showing 91-100 of 4476 results. Next