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.

A225227 The n X n X n dots problem: minimal number of straight lines (connected at their endpoints) required to pass through n^3 dots arranged in an n X n X n grid, without exiting from the box [0, n] X [0, n] X [0, n].

Original entry on oeis.org

1, 7, 13
Offset: 1

Views

Author

Marco Ripà, May 02 2013

Keywords

Comments

A generalization of the well-known "Nine Dots Problem", where the regular axis-aligned bounding box (RAABB:=[0, n] X [0, n] X [0, n]) has been declared.
From Marco Ripà, Aug 10 2020: (Start)
In particular, if we loosen the constraint on the allowed AABB, covering paths characterized by a shorter link-length can be found, such as 5 <= a(2) <= 6, where the aforementioned upper bound has been discovered by Koki Goma in August 2021, providing the self-crossing covering path (0,0,0)-(2,2,0)-(1/2,1/2,3/2)-(2,-1,0)-(0,1,0)-(0,1,1)-(0,0,1).
Moreover, the above pattern suggests different uncrossing covering paths of the same link-length, such as (1,0,0)-(0,0,0)-(2,2,2)-(1/2,-1,1/2)-(-1/2,1,3/2)-(1,1,0)-(1,1,0) and also the (self-crossing) covering path (1,0,0)-(0,0,0)-(0,1,0)-(3/2,1,3/2)-(1/2,-1,1/2)-(-1/2,1,3/2)-(1,1,0) which is entirely contained inside a box of 1.5 X 2 X 2 units^3 but which does not match the RAABB. (End)

Examples

			For n = 2, a(2) = 7. You cannot touch the 8 vertices of a cube using fewer than 7 straight lines and without exiting from the box [0, 2] X [0, 2] X [0, 2], following the "Nine Dots Puzzle" basic rules.
		

Crossrefs

Formula

For any n >= 3, (n^3 - 1)/(n - 1) <= a(n) <= floor((3*n^2)/2) - floor((n - 1)/4) + floor((n + 1)/4) - floor((n + 2)/4) + floor(n/4) + n - 2. - Marco Ripà, Oct 25 2024

Extensions

Entry revised by N. J. A. Sloane, May 02 2013
a(3) corrected by Marco Ripà, Jul 19 2020

A261547 The 3 X 3 X ... X 3 dots problem (3, n times): minimal number of straight lines (connected at their endpoints) required to pass through 3^n dots arranged in a 3 X 3 X ... X 3 grid.

Original entry on oeis.org

1, 1, 4, 13, 40, 121, 364, 1093, 3280, 9841, 29524, 88573, 265720, 797161, 2391484, 7174453, 21523360, 64570081, 193710244, 581130733, 1743392200, 5230176601, 15690529804, 47071589413, 141214768240, 423644304721, 1270932914164
Offset: 0

Views

Author

Marco Ripà, Aug 24 2015

Keywords

Comments

Except for the first term a duplicate of A003462.
This is an n-dimensional generalization of the well-known "Nine Dots Problem".
Except for n < 2, the a(n) represent "outside the box" solutions, but (for any n) the minimal covering trail C(n) is still inside a box of (hyper)volume 3^n units^n. - Marco Ripà, Jul 19 2020

Examples

			For n=5, a(5) = 121. You cannot touch (the centers of) the 3^5 = 243 points using fewer than 121 straight lines, following the "Nine Dots Puzzle" basic rules.
		

Crossrefs

Programs

  • Mathematica
    Join[{1}, (3^Range[30]-1)/2] (* Paolo Xausa, Jan 31 2024 *)

Formula

a(n) = (3^n - 1)/2 = A003462(n), for n >= 1. - Marco Ripà, Jul 19 2020

Extensions

a(4) added by Marco Ripà, Aug 06 2018
a(3)-a(4) corrected and more terms added by Marco Ripà, Jul 19 2020

A363755 The original n X n X n dots problem: minimal number of straight lines (connected at their endpoints) required to join all the n^3 points belonging to the set {{0,1,...,n-1} X {0,1,...,n-1} X {0,1,...,n-1}} in R^3, without any additional constraint.

Original entry on oeis.org

1, 6, 13
Offset: 1

Views

Author

Marco Ripà, Jun 19 2023

Keywords

Comments

The most natural mathematical generalization of the well-known "Nine Dots Problem" by Sam Loyd (published in Cyclopedia of puzzles, p. 301, in 1914) is an NP-hard challenge with no AABB, no constraint about visiting any vertex more than once or self-crossing lines, no restriction on the turning angles available.
This problem has been solved for n < 4 (see links), while it has been proved that a(4) is 21, 22, or 23, since a covering trail (for the n = 4 case) having 23 links is given by (3,3,1)-(1,3,1)-(-2,0,1)-(4,0,1)-(3,0,3)-(3,3,3)-(0,0,0)-(3,0,0)-(0,3,3)-(0,0,3)-(3,3,0)-(-1,3,0)-(2,3,3)-(2,-1,3)-(-1,2,0)-(4,2,0)-(1,-1,3)-(1,4,3)-(4,1,0)-(-1,1,0)-(3,3,2)-(3,-2,2)-(0,7,2)-(0,0,2).
A covering trail for the n = 5 case with a link-length of 36 is (2,3,3)-(-1,0,3)-(4,0,3)-(0,4,3)-(5,4,3)- (3,2,1)-(-1,0,1)-(4,5,1)-(4,0,1)-(0,0,1)-(0,4,1)-(5,-1,1)-(3,3,3)-(0,-3,0)-(0,5,0)-(4,1,4)- (-1,1,4)-(3,5,0)-(3,0,0)-(-1,4,4)-(4,4,4)-(4,0,0)-(4,4,0)-(0,0,4)-(5,0,4)-(1,4,0)-(1,-1,0)- (5,3,4)-(0,3,4)-(2,-1,0)-(2,4,0)-(4,2,4)-(0,2,4)-(4,0,2)-(0,0,2)-(0,4,2)-(4,4,2).

Examples

			For n = 2, a(2) = 6, since it is not possible to touch the 8 vertices of a cube by spending fewer than 6 straight lines (see Theorem 2.2 in Optimal cycles enclosing all the nodes of a k-dimensional hypercube).
		

References

  • Sam Loyd, Cyclopedia of Puzzles, The Lamb Publishing Company, 1914, page 301.

Crossrefs

Formula

For any n >= 3, (n^3 - 1)/(n - 1) <= a(n) <= floor((3*n^2)/2) - floor((n - 1)/4) + floor((n + 1)/4) - floor((n + 2)/4) + floor(n/4) + n - 2.

A318165 The n^n dots problem: minimal number of straight lines (connected at their endpoints) required to pass through n^n dots arranged in an n X n X ... X n grid.

Original entry on oeis.org

1, 3, 13
Offset: 1

Views

Author

Marco Ripà, Aug 20 2018

Keywords

Comments

A generalization of the well-known "Nine Dots Problem".
For any n > 3, an upper bound for this problem is given by U(n) := (t + 1)*n^(n - 3) - 1, where "t" is the best known solution for the corresponding n X n X n case, and (for any n > 5) t = floor((3/2)*n^2) - floor((n - 1)/4) + floor((n + 1)/4) - floor((n - 2)/4) + floor(n/2) + n - 2 (e.g., U(4) = 95, since 23 is the current upper bound for the 4 X 4 X 4 problem). In particular, it is easily possible to prove the existence of an Hamiltonian path without self crossing such that U(4) = 95 (in fact, an Hamiltonian path with link-length 23 for the 4 X 4 X 4 problem was explicitly shown in June 2020).
A (trivial) lower bound is given by B(n):= (n^n - 1)/(n - 1). - Marco Ripà, Aug 25 2020

Examples

			For n = 3, a(3) = 13. You cannot touch (the centers of) the 3 X 3 X 3 dots using fewer than 13 straight lines, following the "Nine Dots Puzzle" basic rules.
		

Crossrefs

Extensions

a(3) corrected by Marco Ripà, Aug 25 2020

A319259 Minimal number of straight lines of a covering tree needed to cover n X n X n points arranged in a 3-D grid.

Original entry on oeis.org

1, 4, 12, 20
Offset: 1

Views

Author

Marco Ripà, Sep 15 2018

Keywords

Comments

For any n > 2, is it possible to construct an "inside the box" covering tree for any n X n X n set of points consisting of n^2 + n lines if n is even and n^2 + n + 1 lines if n is odd.
In the special case of any 2 X 2 X ... X 2 points problem (k-times n), every optimal covering tree has (exactly) 2^(k-1) rectilinear segments, thus 2^(3-1) = 4 lines for the 2 x 2 x 2 case.
If n = 3, then the (outside the box) solution is a(3) = 12, since such a connected arrangement of line segments has already been shown to exist, and this explicit upper bound matches 3^3 + 3. - Marco Ripà, Aug 25 2020
Let n >= 5, we know that it is impossible to cover more than n^3 points with n^2 segments (trivial), and we need at least n segments to obtain a connected graph (otherwise, we cannot join more than n + h*(n - 1) points with h + 1 connected lines). Thus, assuming n > 2, the general lower bound is confirmed to be n^2 + n, therefore a(n even) = 4, 20, 42, 72, ...

Examples

			For n = 3 the a(3) = 12 represents the minimum line segments to cover a 3 X 3 X 3 points (symmetrical) grid. - _Marco Ripà_, Aug 25 2020
		

Crossrefs

Formula

a(n) = n^2 + n for even n and for n = 3. - Marco Ripà, Aug 25 2020

Extensions

a(3) corrected by Marco Ripà, Aug 25 2020

A374224 Integer part of the total Euclidean length of the shortest minimum-link polygonal chains joining all the nodes of the grid {0,1,...,n-1} X {0,1,...,n-1}.

Original entry on oeis.org

0, 3, 12, 20, 28, 40, 53, 68, 85, 104, 125, 148, 173, 200, 229, 260, 293, 328, 365, 404, 445, 488, 533, 580, 629, 680, 733, 788, 845, 904, 965, 1028, 1093, 1160, 1229, 1300, 1373, 1448, 1525, 1604, 1685, 1768, 1853, 1940, 2029, 2120, 2213, 2308, 2405, 2504
Offset: 1

Views

Author

Marco Ripà, Jun 30 2024

Keywords

Comments

This sequence describes the optimal solution of the 2D generalization of the well-known nine dots problem, published in Loyd’s Cyclopedia of Puzzles (1914), p. 301.
Since Solomon Golomb constructively proved that, for any n >= 3, the minimum-link polygonal chain covering a given {0,1,...,n-1} X {0,1,...,n-1} grid consists of (exactly) 2*(n - 1) line segments, we only need to find the shortest trail satisfying the constraint above.
In detail, if n = 2, the trivial spanning path (0,1)-(0,0)-(1,0)-(1,1) is optimal. If n = 3, we have the classic solution of the nine dots problem (0,1)-(0,3)-(3,0)-(0,0)-(2,2). Now, if n > 3, a valid upper bound is given by n^2 + 5*sqrt(2) - 3, but it is possible to improve this solution for the n = 5 case by providing the trail.
(2,3)-(4,3)-(1,0)-(1,3)-(4,0)-(0,0)-(0,4)-(4,4)-(4,1), whose total Euclidean length is 20 + 6*sqrt(2). In the end, assuming n > 5, we can recycle the mentioned solution, then extend the last line segment to reach (4,-1), and finally apply the square spiral pattern to the (extended) ending segment of the {0,1,...,n-1} X {0,1,...,n-1} grid solution in order to get the solution for the {0,1,...,n} X {0,1,...,n} case, joining 2*n + 1 more points by spending two additional line segments having a combined length of 2*n (and this is an iterative strategy which is optimal for any n > 5).

Examples

			a(2) = 3 since we can join the points {0,1}^2 with a spanning path consisting of 3 line segments having a total Euclidean length of 2^2 - 1.
		

Crossrefs

Programs

  • Mathematica
    Join[{0, 3, 12, 20, 28} Table[Floor[n^2 + 5*Sqrt[2]] - 3 , {n, 6, 50}]]
    LinearRecurrence[{3,-3,1},{0,3,12,20,28,40,53,68},50] (* Harvey P. Dale, Jul 19 2025 *)

Formula

a(1) = 1, a(2) = 3, a(3) = floor(5*(1+sqrt(2))) = 12, a(5) = floor(20 + 6*sqrt(2)) = 28, and a(n) = floor(n^2 + 5*sqrt(2)) - 3 iff n = 4 or n >= 6.
For n > 5, a(n) = n^2 + 4.
G.f.: x^2*(3 + 3*x - 7*x^2 + x^3 + 4*x^4 - 3*x^5 + x^6)/(1 - x)^3. - Stefano Spezia, Jul 02 2024
Showing 1-6 of 6 results.