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

A089473 Number of configurations of the sliding block 8-puzzle that require a minimum of n moves to be reached, starting with the empty square in one of the corners.

Original entry on oeis.org

1, 2, 4, 8, 16, 20, 39, 62, 116, 152, 286, 396, 748, 1024, 1893, 2512, 4485, 5638, 9529, 10878, 16993, 17110, 23952, 20224, 24047, 15578, 14560, 6274, 3910, 760, 221, 2
Offset: 0

Views

Author

Hugo Pfoertner, Nov 19 2003

Keywords

Comments

The sequence was first provided by Alexander Reinefeld in Table 1 of "Complete Solution of the Eight-Puzzle..." (see corresponding link in A087725) with a typo "749" instead of "748" for a(12).

Examples

			From the starting configuration
123
456
78-
the two final configurations requiring 31 moves are
647 ... 867
85- and 254
321 ... 3-1
		

References

  • For references and links see A087725.

Crossrefs

Cf. A087725 = maximum number of moves for n X n puzzle, A089474 = 8-puzzle starting with blank square at center, A089483 = 8-puzzle starting with blank square at mid-side, A089484 = solution lengths for 15-puzzle, A090031 - A090036 = other sliding block puzzles.

Programs

  • Python
    # alst(), swap(), moves() useful for other sliding puzzle problems
    def swap(p, z, nz):
      lp = list(p)
      lp[z], lp[nz] = lp[nz], "-"
      return "".join(lp)
    def moves(p, shape): # moves for n x m sliding puzzle
      nxt, (n, m), z = [], shape, p.find("-") # z: blank location
      if z > n - 1:  nxt.append(swap(p, z, z-n)) # blank up
      if z < n*m-n:  nxt.append(swap(p, z, z+n)) # blank down
      if z%n != 0:   nxt.append(swap(p, z, z-1)) # blank left
      if z%n != n-1: nxt.append(swap(p, z, z+1)) # blank right
      return nxt
    def alst(start, shape, v=False, maxd=float('inf')):
      alst, d, expanded, frontier = [], 0, set(), {start}
      alst.append(len(frontier))
      if v: print(len(frontier), end=", ")
      while len(frontier) > 0 and d < maxd:
        reach1 = set(m for p in frontier for m in moves(p, shape) if m not in expanded)
        expanded |= frontier # expanded = frontier # ALTERNATE using less memory
        if len(reach1):
          alst.append(len(reach1))
          if v: print(len(reach1), end=", ")
        frontier = reach1
        d += 1
      return alst
    print(alst("-12345678", (3, 3))) # Michael S. Branicky, Dec 28 2020

A090033 Triangle T(j,k) read by rows, where T(j,k) is the number of single tile moves in the longest optimal solution of the j X k generalization of the sliding block 15-puzzle, starting with the empty square in a corner.

Original entry on oeis.org

0, 1, 6, 2, 21, 31, 3, 36, 53, 80, 4, 55, 84
Offset: 1

Views

Author

Hugo Pfoertner, Nov 23 2003

Keywords

Comments

T(k,j) = T(j,k).
T(2,2), T(2,3), T(4,2), T(4,3) from Karlemo and Östergård, T(3,3) from Reinefeld, T(4,4) from Bruengger et al.

Examples

			The triangle begins
  0
  1   6
  2  21  31
  3  36  53  80
  4  55  84  ...
.
a(6)=T(3,3)=31 because the A090163(3,3)=2 longest optimal solution paths of the 3 X 3 (9-) sliding block puzzle have length 31 (see A089473).
		

References

  • For references and links see A087725(n)=T(n,n).

Crossrefs

Cf. A087725, A089473, A089484, A090034, A090035, A090036, A090166, A090163 corresponding number of different configurations with largest distance.
Cf. A151944 same as this sequence, but written as full array.

Programs

  • Python
    # alst(), moves(), swap() in A089473
    def T(j, k):  # chr(45) is '-'
        start, shape = "".join(chr(45+i) for i in range(j*k)), (j, k)
        return len(alst(start, shape))-1
    for j in range(1, 5):
        for k in range(1, j+1):
            print(T(j,k), end=", ") # Michael S. Branicky, Aug 02 2021

Extensions

T(5,3) copied from A151944 by Hugo Pfoertner, Aug 02 2021

A090034 Number of configurations of the 3 X 2 variant of Sam Loyd's sliding block 15-puzzle that require a minimum of n moves to be reached, starting with the empty square in one of the corners.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 10, 12, 12, 16, 23, 25, 28, 39, 44, 40, 29, 21, 18, 12, 6, 1
Offset: 0

Views

Author

Hugo Pfoertner, Nov 23 2003

Keywords

Comments

Data from Karlemo and Östergård. See corresponding link in A087725.

Examples

			Starting with
123
45-
the most distant configuration corresponding to a(21)=1 is
45-
123 (i.e., it takes longest just to swap the two rows).
		

References

Crossrefs

Programs

A090035 Number of configurations of the 4 X 2 variant of Sam Loyd's sliding block 15-puzzle that require a minimum of n moves to be reached, starting with the empty square in one of the corners.

Original entry on oeis.org

1, 2, 3, 6, 10, 14, 19, 28, 42, 61, 85, 119, 161, 215, 293, 396, 506, 632, 788, 985, 1194, 1414, 1664, 1884, 1999, 1958, 1770, 1463, 1076, 667, 361, 190, 88, 39, 19, 7, 1
Offset: 0

Views

Author

Hugo Pfoertner, Nov 26 2003

Keywords

Comments

Data from Karlemo, Östergård. See corresponding link in A087725.

Examples

			Starting from
1234
567-
the most distant configuration corresponding to a(36)=1 is
-721
4365
		

References

Crossrefs

Cf. A087725, A089473. Index of last sequence term: A090033. Other nonsquare sliding block puzzles: A090034, A090036, A090166, A090167.

Programs

A090167 Number of configurations of the 6 X 2 variant of the so-called "Sam Loyd" sliding block 15-puzzle that require a minimum of n moves to be reached, starting with the empty square in one of the corners.

Original entry on oeis.org

1, 2, 3, 6, 11, 20, 36, 60, 95, 155, 258, 426, 688, 1106, 1723, 2615, 3901, 5885, 8851, 13205, 19508, 28593, 41179, 58899, 83582, 118109, 165136, 228596, 312542, 423797, 568233, 755727, 994641, 1296097, 1667002, 2119476, 2660415, 3300586, 4038877
Offset: 0

Views

Author

Hugo Pfoertner, Nov 27 2003

Keywords

Crossrefs

Cf. A087725, A089473. Index of last sequence term: A090033. Other nonsquare sliding block puzzles: A090034, A090035, A090036, A090166.

Programs

Extensions

More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), Oct 22 2006

A090166 Number of configurations of the 4 X 3 variant of Sam Loyd's sliding block 15-puzzle that require a minimum of n moves to be reached, starting with the empty square in one of the corners.

Original entry on oeis.org

1, 2, 4, 9, 20, 37, 63, 122, 232, 431, 781, 1392, 2494, 4442, 7854, 13899, 24215, 41802, 71167, 119888, 198363, 323206, 515778, 811000, 1248011, 1885279, 2782396, 4009722, 5621354, 7647872, 10065800, 12760413, 15570786, 18171606, 20299876, 21587248, 21841159, 20906905, 18899357, 16058335, 12772603, 9515217, 6583181, 4242753, 2503873, 1350268, 643245, 270303, 92311, 27116, 5390, 1115, 86, 18
Offset: 0

Views

Author

Hugo Pfoertner, Nov 27 2003, Jul 07 2007

Keywords

Comments

Data from Karlemo and Östergård.

Crossrefs

Cf. A087725. Index of last sequence term: A090033. Other nonsquare sliding block puzzles: A090034, A090035, A090036, A090167.

Programs

A346736 Number of configurations of the 7 X 2 variant of the sliding block 15-puzzle that require a minimum of n moves to be reached, starting with the empty square in one of the corners.

Original entry on oeis.org

1, 2, 3, 6, 11, 20, 37, 67, 117, 198, 329, 557, 942, 1575, 2597, 4241, 6724, 10535, 16396, 25515, 39362, 60532, 92089, 138969, 207274, 307725, 453000, 664240, 964874, 1392975, 1992353, 2832063, 3988528, 5586275, 7756511, 10698721, 14621717, 19840724, 26676629
Offset: 0

Views

Author

Ben Whitmore, Jul 31 2021

Keywords

Comments

This sequence was originally computed by Richard Korf, but the full sequence was not included in his paper. It was later re-computed by Tomas Rokicki.

Examples

			Starting from the solved configuration
  1  2  3  4  5  6  7
  8  9 10 11 12 13
the unique configuration requiring 108 moves is
  7  6 12  4  3  9  1
    13  5 11 10  2  8
		

Crossrefs

Programs

A346737 Number of configurations of the 5 X 3 variant of the sliding block 15-puzzle that require a minimum of n moves to be reached, starting with the empty square in one of the corners.

Original entry on oeis.org

1, 2, 4, 9, 21, 42, 89, 164, 349, 644, 1349, 2473, 5109, 9110, 18489, 32321, 64962, 112445, 223153, 378761, 740095, 1231589, 2364342, 3847629, 7246578, 11506172, 21233764, 32854049, 59293970, 89146163, 157015152, 228894783, 392648931, 553489877, 922382155
Offset: 0

Views

Author

Ben Whitmore, Jul 31 2021

Keywords

Comments

This sequence was originally computed by Richard Korf, but the full sequence was not included in his paper. It was later re-computed by Tomas Rokicki.

Examples

			Starting from the solved configuration
   1  2  3  4  5
   6  7  8  9 10
  11 12 13 14
the unique configuration requiring 84 moves is
   5  4  3  2  1
  10  9  8  7  6
     14 13 12 11
		

Crossrefs

Programs

A355560 Number of configurations of the 8 X 2 variant of the sliding block 15-puzzle that require a minimum of n moves to be reached, starting with the empty square in one of the corners.

Original entry on oeis.org

1, 2, 3, 6, 11, 20, 37, 68, 125, 227, 394, 672, 1151, 1983, 3373, 5703, 9508, 15640, 25293, 40732, 65032, 103390, 162830, 255543, 397013, 613104, 938477, 1431068, 2162964, 3255845, 4860428, 7223861, 10649867, 15628073, 22747718, 32963838, 47397514, 67825949, 96317070
Offset: 0

Views

Author

Ben Whitmore, Jul 06 2022

Keywords

Comments

This sequence was computed by Richard Korf in "Linear-time Disk-Based Implicit Graph Search" (see links), but was not included in the paper.

Examples

			Starting from the solved configuration
   1  2  3  4  5  6  7  8
   9 10 11 12 13 14 15
the unique configuration requiring 140 moves is
      8  6  5  4  3 10  1
  15  7 14 13 12 11  2  9
		

Crossrefs

Programs

Showing 1-9 of 9 results.