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.

A090573 Number of configurations of the 3-dimensional 3 X 3 X 3 sliding cube puzzle that require a minimum of n moves to be reached, starting with the empty space at one of the enclosing cube corners.

Original entry on oeis.org

1, 3, 9, 30, 102, 324, 1029, 3096, 9960, 30732, 97932, 295924, 929202, 2766958, 8590731, 25271897, 77575820
Offset: 0

Views

Author

Hugo Pfoertner, Jan 15 2004

Keywords

Comments

The 3 X 3 X 3 sliding cube puzzle is a generalization of the 2 X 2 X 2 3-D puzzle A090572. There are various designs of this 3 X 3 X 3 puzzle, but in most of them the central cube is not freely accessible and the empty space cannot be moved to the central location of the cube. The design treated in this sequence assumes full accessibility of the central location.

References

  • Ji-Ha You, Three dimensional puzzle with blocks - has cube frame with hollow interior and movable blocks filled on one side with magnet. German Patent application DE-4106826 A1, March 4, 1991 - see link

Crossrefs

Cf. A090572 2 X 2 X 2 puzzle, A090574, A090575, A090576 3 X 3 X 3 puzzle with different initial configurations.

Programs

  • Python
    # uses alst(), swap() in A089473
    def moves3d(p, shape, fixed=None): # n x m x r puzzle
      nxt, (n, m, r) = [], shape
      L, z = n*m, p.find("-") # z: location of blank
      zq, zr = divmod(z, L)
      if zr > n - 1:  nxt.append(swap(p, z, z-n)) # blank up
      if zr < n*m-n:  nxt.append(swap(p, z, z+n)) # blank down
      if zr%n != 0:   nxt.append(swap(p, z, z-1)) # blank left
      if zr%n != n-1: nxt.append(swap(p, z, z+1)) # blank right
      if zq > 0:      nxt.append(swap(p, z, z-L)) # blank in
      if zq < r - 1:  nxt.append(swap(p, z, z+L)) # blank out
      return [m for m in nxt if m.find("-") != fixed]
    moves = lambda p, shape: moves3d(p, shape)
    start, shape = "-123456789ABCDEFGHIJKLMNOPQ", (3, 3, 3)
    print(alst(start, shape, maxd=12)) # Michael S. Branicky, Dec 28 2020

Extensions

a(13)-a(16) from Michael S. Branicky, Dec 28 2020