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-10 of 43 results. Next

A063524 Characteristic function of 1.

Original entry on oeis.org

0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Labos Elemer, Jul 30 2001

Keywords

Comments

The identity function for Dirichlet multiplication (see Apostol).
Sum of the Moebius function mu(d) of the divisors d of n. - Robert G. Wilson v, Sep 30 2006
-a(n) is the Hankel transform of A000045(n), n >= 0 (Fibonacci numbers). See A055879 for the definition of Hankel transform. - Wolfdieter Lang, Jan 23 2007
a(A000012(n)) = 1; a(A087156(n)) = 0. - Reinhard Zumkeller, Oct 11 2008
a(n) for n >= 1 is the Dirichlet convolution of following functions b(n), c(n), a(n) = Sum_{d|n} b(d)*c(n/d): a(n) = A008683(n) * A000012(n), a(n) = A007427(n) * A000005(n), a(n) = A007428(n) * A007425(n). - Jaroslav Krizek, Mar 03 2009
From Christopher Hunt Gribble, Jul 11 2013: (Start)
a(n) for 1 <= n <= 4 and conjectured for n > 4 is the number of Hamiltonian circuits in a 2n X 2n square lattice of nodes, reduced for symmetry, where the orbits under the symmetry group of the square, D4, have 1 element: When n=1, there is only 1 Hamiltonian circuit in a 2 X 2 square lattice, as illustrated below. The circuit is the same when rotated and/or reflected and so has only 1 orbital element under the symmetry group of the square.
o--o
| |
o--o (End)
Convolution property: For any sequence b(n), the sequence c(n)=b(n)*a(n) has the following values: c(1)=0, c(n+1)=b(n) for all n > 1. In other words, the sequence b(n) is shifted 1 step to the right. - David Neil McGrath, Nov 10 2014

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 30.

Crossrefs

Programs

Formula

From Philippe Deléham, Nov 25 2008: (Start)
G.f.: x.
E.g.f.: x. (End)
a(n) = mu(n^2). - Enrique Pérez Herrero, Sep 04 2009
a(n) = floor(n/A000203(n)) for n > 0. - Enrique Pérez Herrero, Nov 11 2009
a(n) = (1-(-1)^(2^abs(n-1)))/2 = (1-(-1)^(2^((n-1)^2)))/2. - Luce ETIENNE, Jun 05 2015
a(n) = n*(A057427(n) - A057427(n-1)) = A000007(abs(n-1)). - Chayim Lowen, Aug 01 2015
a(n) = A010051(p*n) for any prime p (where A010051(0)=0). - Chayim Lowen, Aug 05 2015
From Antti Karttunen, Jun 04 2022: (Start)
For n >= 1:
a(n) = Sum_{d|n} A000010(n/d) * A023900(d), and similarly for any pair of sequences that are Dirichlet inverses of each other, like for example A000027 & A055615 and those mentioned in Krizek's Mar 03 2009 comment above.
a(n) = [A101296(n) == 1], where [ ] is the Iverson bracket.
Fully multiplicative with a(p^e) = 0. (End)

A120443 Number of (undirected) Hamiltonian paths in the n X n grid graph.

Original entry on oeis.org

1, 4, 20, 276, 4324, 229348, 13535280, 3023313284, 745416341496, 730044829512632, 786671485270308848, 3452664855804347354220, 16652005717670534681315580, 331809088406733654427925292528, 7263611367960266490262600117251524
Offset: 1

Views

Author

David Bevan, Jul 19 2006

Keywords

Examples

			From _Robert FERREOL_, Apr 03 2019: (Start)
a(3) = 20:
there are 4 paths similar to
  + - + - +
          |
  + - + - +
  |
  + - + - +
8 paths similar to
  + - + - +
  |       |
  +   + - +
  |   |
  +   + - +
and 8 paths similar to
  + - + - +
  |       |
  +   +   +
  |   |   |
  +   + - +
(End)
		

Crossrefs

Formula

a(n) = A096969(n) / 2 for n > 1.

Extensions

More terms from Jesper L. Jacobsen (jesper.jacobsen(AT)u-psud.fr), Dec 12 2007

A000532 Number of Hamiltonian paths from NW to SW corners in an n X n grid.

Original entry on oeis.org

1, 1, 2, 8, 86, 1770, 88418, 8934966, 2087813834, 1013346943033, 1111598871478668, 2568944901392936854, 13251059359839620127088, 145194816279817259193401518, 3524171261632305641165676374930, 182653259988707123426135593460533473
Offset: 1

Views

Author

Russ Cox, Mar 15 1996

Keywords

Comments

Number of walks reaching each cell exactly once.

Crossrefs

Extensions

More terms from Zhao Hui Du, Jul 08 2008
Edited by Franklin T. Adams-Watters, Jul 03 2009
Name clarified by Andrew Howroyd, Apr 10 2016

A231829 Square array read by antidiagonals: T(m,n) = number of ways of creating a closed, simple loop on an m X n rectangular lattice.

Original entry on oeis.org

1, 3, 3, 6, 13, 6, 10, 40, 40, 10, 15, 108, 213, 108, 15, 21, 275, 1049, 1049, 275, 21, 28, 681, 5034, 9349, 5034, 681, 28, 36, 1664, 23984, 80626, 80626, 23984, 1664, 36, 45, 4040, 114069, 692194, 1222363, 692194, 114069, 4040, 45
Offset: 1

Views

Author

Douglas Boffey, Nov 14 2013

Keywords

Comments

This sequence is read in a table, thus:
m ->
1, 3, 6, 10, …
n 3, 13, 40, …
| 6, 40, …
v 10, …
This sequence gives the number of closed, simple loops on a rectangular lattice of dots, where the edges of the loop can be horizontal or vertical.
This is also the number of solutions to an unclued slitherlink puzzle.
Main diagonal is A140517. - Joerg Arndt, Sep 01 2014
Equivalently, the number of cycles in the grid graph P_{m+1} X P_{n+1}. - Andrew Howroyd, Jun 12 2017

Examples

			Table starts:
=================================================================
m\n|  1    2      3       4         5           6            7
---|-------------------------------------------------------------
1  |  1    3      6      10        15          21           28...
2  |  3   13     40     108       275         681         1664...
3  |  6   40    213    1049      5034       23984       114069...
4  | 10  108   1049    9349     80626      692194      5948291...
5  | 15  275   5034   80626   1222363    18438929    279285399...
6  | 21  681  23984  692194  18438929   487150371  12947640143...
7  | 28 1664 114069 5948291 279285399 12947640143 603841648931...
... - _Andrew Howroyd_, Jun 12 2017
a(2,2) = 13, thus:
1)        2)        3)        4)        5)
+-+ +     + +-+     + + +     + + +     +-+ +
| |         | |                         | |
+-+ +     + +-+     +-+ +     + +-+     + + +
                    | |         | |     | |
+ + +     + + +     +-+ +     + +-+     +-+ +
6)        7)        8)        9)        10)
+ +-+     +-+-+     + + +     +-+ +     + +-+
  | |     |   |               | |         | |
+ + +     +-+-+     +-+-+     + +-+     +-+ +
  | |               |   |     |   |     |   |
+ +-+     + + +     +-+-+     +-+-+     +-+-+
11)       12)       13)
+-+-+     +-+-+     +-+-+
|   |     |   |     |   |
+-+ +     + +-+     + + +
  | |     | |       |   |
+ +-+     +-+ +     +-+-+
		

Crossrefs

Main diagonal is A140517.

Programs

  • Python
    # Using graphillion
    from graphillion import GraphSet
    import graphillion.tutorial as tl
    def A231829(n, k):
        universe = tl.grid(n, k)
        GraphSet.set_universe(universe)
        cycles = GraphSet.cycles()
        return cycles.len()
    print([A231829(j + 1, i - j + 1) for i in range(9) for j in range(i + 1)])  # Seiichi Manyama, Nov 24 2020

A209077 Number of Hamiltonian circuits (or self-avoiding rook's tours) on a 2n X 2n grid reduced for symmetry, i.e., where rotations and reflections are not counted as distinct.

Original entry on oeis.org

1, 2, 149, 580717, 58407763266, 134528361351329451, 7015812452562871283559623, 8235314565328229583744138065519908, 216740797236120772990979350241355889872437894, 127557553423846099192878370713500303677609606263171680998
Offset: 1

Views

Author

N. J. A. Sloane, Mar 04 2012

Keywords

Comments

Christopher Hunt Gribble confirms a(3), and reports that there are 121 figures with group of order 1, 24 with group of order 2, and 4 with group of order 4. Then 121*(8/1) + 24*(8/2) + 4*(8/4) = 1072 = A003763(3), 121 + 24 + 4 = 149 = a(3). - N. J. A. Sloane, Feb 22 2013

References

  • Jon Wild, Posting to Sequence Fans Mailing List, Dec 10 2011.

Crossrefs

Extensions

a(5)-a(10) from Ed Wynn, Feb 05 2014

A321172 Triangle read by rows: T(m,n) = number of Hamiltonian cycles on m X n grid of points (m >= 2, 2 <= n <= m).

Original entry on oeis.org

1, 1, 0, 1, 2, 6, 1, 0, 14, 0, 1, 4, 37, 154, 1072, 1, 0, 92, 0, 5320, 0, 1, 8, 236, 1696, 32675, 301384, 4638576, 1, 0, 596, 0, 175294, 0, 49483138, 0, 1, 16, 1517, 18684, 1024028, 17066492, 681728204, 13916993782, 467260456608
Offset: 2

Views

Author

Robert FERREOL, Jan 10 2019

Keywords

Comments

Orientation of the path is not important; you can start going either clockwise or counterclockwise. Paths related by symmetries are considered distinct.
The m X n grid of points when drawn forms a (m-1) X (n-1) rectangle of cells, so m-1 and n-1 are sometimes used as indices instead of m and n (see, e. g., Kreweras' reference below).
These cycles are also called "closed non-intersecting rook's tours" on m X n chess board.

Examples

			T(5,4)=14 is illustrated in the links above.
Table starts:
=================================================================
m\n|  2    3      4       5         6           7            8
---|-------------------------------------------------------------
2  |  1    1      1       1         1           1            1
3  |  1    0      2       0         4           0            8
4  |  1    2      6      14        37          92          236
5  |  1    0     14       0       154           0         1696
6  |  1    4     37     154      1072        5320        32675
7  |  1    0     92       0      5320           0       301384
8  |  1    8    236    1696     32675      301384      4638576
The table is symmetric, so it is completely described by its lower-left half.
		

Crossrefs

Row/column k=4..12 are: (with interspersed zeros for odd k): A006864, A006865, A145401, A145416, A145418, A160149, A180504, A180505, A213813.
Cf. A003763 (bisection of main diagonal), A222200 (subdiagonal), A231829, A270273, A332307.
T(n,2n) gives A333864.

Programs

  • Python
    # Program due to Laurent Jouhet-Reverdy
    def cycle(m, n):
         if (m%2==1 and n%2==1): return 0
         grid = [[0]*n for _ in range(m)]
         grid[0][0] = 1; grid[1][0] = 1
         counter = [0]; stop = m*n-1
         def run(i, j, nb_points):
             for ni, nj in [(i-1, j), (i+1, j), (i, j+1), (i, j-1)] :
                 if  0<=ni<=m-1 and 0<=nj<=n-1 and grid[ni][nj]==0 and (ni,nj)!=(0,1):
                     grid[ni][nj] = 1
                     run(ni, nj, nb_points+1)
                     grid[ni][nj] = 0
                 elif (ni,nj)==(0,1) and nb_points==stop:
                     counter[0] += 1
         run(1, 0, 2)
         return counter[0]
    L=[];n=7#maximum for a time < 1 mn
    for i in range(2,n):
        for j in range(2,i+1):
           L.append(cycle(i,j))
    print(L)

Formula

T(m,n) = T(n,m).
T(2m+1,2n+1) = 0.
T(2n,2n) = A003763(n).
T(n,n+1) = T(n+1,n) = A222200(n).
G. functions , G_m(x)=Sum {n>=0} T(m,n-2)*x^n after Stoyan's link p. 18 :
G_2(x) = 1/(1-x) = 1+x+x^2+...
G_3(x) = 1/(1-2*x^2) = 1+2*x^2+4*x^4+...
G_4(x) = 1/(1-2*x-2*x^2+2*x^3-x^4) = 1+2*x+6*x^2+...
G_5(x) = (1+3*x^2)/(1-11*x^2-2*x^6) = 1+14*x^2+154*x^4+...

Extensions

More terms from Pontus von Brömssen, Feb 15 2021

A145157 Number of Greek-key tours on an n X n board; i.e., self-avoiding walks on n X n grid starting in top left corner.

Original entry on oeis.org

1, 2, 8, 52, 824, 22144, 1510446, 180160012, 54986690944, 29805993260994, 41433610713353366, 103271401574007978038, 660340630211753942588170, 7618229614763015717175450784, 225419381425094248494363948728158
Offset: 1

Views

Author

Nathaniel Johnston, Oct 03 2008

Keywords

Comments

The sequence may be enumerated using standard methods for counting Hamiltonian cycles on a modified graph with two additional nodes, one joined to a corner vertex and the other joined to all other vertices. - Andrew Howroyd, Nov 08 2015

Crossrefs

Extensions

a(9)-a(15) from Andrew Howroyd, Nov 08 2015

A288518 Array read by antidiagonals: T(m,n) = number of (undirected) paths in the grid graph P_m X P_n.

Original entry on oeis.org

0, 1, 1, 3, 12, 3, 6, 49, 49, 6, 10, 146, 322, 146, 10, 15, 373, 1618, 1618, 373, 15, 21, 872, 7119, 14248, 7119, 872, 21, 28, 1929, 28917, 111030, 111030, 28917, 1929, 28, 36, 4118, 111360, 801756, 1530196, 801756, 111360, 4118, 36
Offset: 1

Views

Author

Andrew Howroyd, Jun 10 2017

Keywords

Comments

Paths of length zero are not counted here.

Examples

			Table starts:
=================================================================
m\n|  1    2      3       4         5          6            7
---|-------------------------------------------------------------
1  |  0    1      3       6        10         15           21 ...
2  |  1   12     49     146       373        872         1929 ...
3  |  3   49    322    1618      7119      28917       111360 ...
4  |  6  146   1618   14248    111030     801756      5493524 ...
5  | 10  373   7119  111030   1530196   19506257    235936139 ...
6  | 15  872  28917  801756  19506257  436619868   9260866349 ...
7  | 21 1929 111360 5493524 235936139 9260866349 343715004510 ...
...
		

Crossrefs

A112676 Number of (undirected) Hamiltonian cycles on a triangular grid, n vertices on each side.

Original entry on oeis.org

1, 1, 1, 3, 26, 474, 17214, 1371454, 231924780, 82367152914, 61718801166402, 97482824713311442, 323896536556067453466, 2262929852279448821099932, 33231590982432936619392054662, 1025257090790362187626154669771934, 66429726878393651076826663971376589034
Offset: 1

Views

Author

Gareth McCaughan, Dec 30 2005

Keywords

Comments

This sequence counts cycles in a triangular region of the familiar 2-dimensional lattice in which each point has 6 neighbors (sometimes called either the "triangular" or the "hexagonal" lattice), visiting every vertex of the region exactly once and returning to the starting vertex. Cycles differing only in orientation or starting point are not considered distinct.

Examples

			a(3) = 1, the only Hamiltonian cycle being the obvious one running around the edge of the triangle.
		

Crossrefs

Programs

  • Python
    # Using graphillion
    from graphillion import GraphSet
    def make_n_triangular_grid_graph(n):
        s = 1
        grids = []
        for i in range(n + 1, 1, -1):
            for j in range(i - 1):
                a, b, c = s + j, s + j + 1, s + i + j
                grids.extend([(a, b), (a, c), (b, c)])
            s += i
        return grids
    def A112676(n):
        if n == 1: return 1
        universe = make_n_triangular_grid_graph(n - 1)
        GraphSet.set_universe(universe)
        cycles = GraphSet.cycles(is_hamilton=True)
        return cycles.len()
    print([A112676(n) for n in range(1, 12)])  # Seiichi Manyama, Nov 30 2020

Formula

For n>1, a(n) = A174589(n)/2.

Extensions

a(11)-a(16) from Andrew Howroyd, Nov 03 2015
a(17) from Pettersson by Andrey Zabolotskiy, May 23 2017

A271507 Number of self-avoiding walks of any length from NW to SW corners on an n X n grid or lattice.

Original entry on oeis.org

1, 2, 11, 178, 8590, 1246850, 550254085, 741333619848, 3046540983075504, 38141694646516492843, 1453908228148524205711098, 168707605740228097581729005751, 59588304533380500951726150179910606, 64061403305026776755367065417308840021540
Offset: 1

Views

Author

Andrew Howroyd, Apr 08 2016

Keywords

Crossrefs

Main diagonal of A271465.

Programs

  • Mathematica
    A271465 = Cases[Import["https://oeis.org/A271465/b271465.txt", "Table"], {, }][[All, 2]];
    a[n_] := A271465[[2 n^2 - 2 n + 1]];
    Table[a[n], {n, 1, 14}] (* Jean-François Alcover, Sep 23 2019 *)
  • Python
    # Using graphillion
    from graphillion import GraphSet
    import graphillion.tutorial as tl
    def A271507(n):
        if n == 1: return 1
        universe = tl.grid(n - 1, n - 1)
        GraphSet.set_universe(universe)
        start, goal = 1, n
        paths = GraphSet.paths(start, goal)
        return paths.len()
    print([A271507(n) for n in range(1, 10)])  # Seiichi Manyama, Mar 21 2020
Showing 1-10 of 43 results. Next