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

A386671 All integers k that can produce a closed walk in a square lattice via noncongruent primitive k-length hypotenuses, in ascending order.

Original entry on oeis.org

40885, 69745, 98605, 127465, 146705, 175565, 214045, 233285, 242905, 262145, 271765, 329485, 358345, 377585, 416065, 435305, 464165, 473785, 550745, 560365, 579605, 618085, 646945, 666185, 675805, 695045, 704665, 752765, 762385, 787205, 810485, 839345, 848965
Offset: 1

Views

Author

Charles L. Hohn, Jul 28 2025

Keywords

Comments

Most of the initial terms are (5 * 13 * 37) * p, where p is a Pythagorean prime (A002144) other than 5, 13, or 37. These terms produce walks of 8 segments that form the same bilaterally symmetrical base shape, scaled up by a factor of p, and rotated such that the axis of symmetry becomes the hypotenuse of Pythagorean triangle [x, y, p] * 6392. See Links for examples.
Other series with their own such patterns occur with a series based on (29 * 61 * 89) * p beginning at a(30) = 787205, and another based on (13 * 109 * 229) * p beginning at a(60) = 1622465. It is conjectured that there are infinitely many of such series.
The first term that is a product of 5 different Pythagorean primes, a(44) = 1185665, is also the first that produces multiple different solutions.
It is conjectured that all terms are products of 4 or more Pythagorean primes, including at least 4 different ones, though not all such products produce closed walks. It is also conjectured that all walks have an even count of hypotenuse segments and a minimum of 6 segments, and are bilaterally symmetrical when arranged in order of increasing angle.
The shortest such walk in 2 or more dimensions, by total walk length rather than diagonal segment length, gives A385525, with A385525(2) = a(1) * 8. Closed walks along diagonals in an equilateral triangular lattice gives A387031.

Examples

			a(1) = 40885 because 40885-length hypotenuses of primitive Pythagorean triangles [38076, 14893] + [35844, 19667] + [11603, 39204] + [-34387, 22116] + [-37523, 16236] + [-26093, -31476] + [3636, -40723] + [8844, -39917] = [0, 0].
		

Crossrefs

Programs

  • PARI
    is_a386671(k)={my(v=List); for(x=1, sqrtint(k^2/2), my(y=sqrtint(k^2-x^2)); if(x^2+y^2==k^2 && gcd([x, y, k])==1, listput(v, [x, y]))); return(if(#v>=3 && closable(v), 1, 0))}
    closable(v, c=vector(3))={my(o=!c[1] && !c[2]); if(#v==1, return(if(c[3] && (o || vecsort(abs([c[1], c[2]]))==vecsort(abs(v[1]))), 1, 0))); my(x, y, v2=v); listpop(v2); foreach(if(o, [0, 1], [0, 1, -1]), x, foreach(if(!x, [0], o, [1], [1, -1]), y, forperm(2, p, if(closable(v2, c+[v[#v][p[1]]*x, v[#v][p[2]]*y, abs(x)]), return(1)); if(!x || o, break)))); 0}

A386251 Consider the graph whose vertices are the points of the n-dimensional cubic lattice with points connected by all integer-length diagonals that traverse all n dimensions and do not intersect intermediate points. a(n) is the total length of the shortest possible closed walk in this graph via noncongruent diagonals.

Original entry on oeis.org

60, 28, 20, 22, 18, 16, 18, 18, 16, 18, 18, 18, 20, 20, 18, 20, 20, 20, 22, 22, 22, 24, 24, 22, 24, 24, 24, 26, 24, 24, 26, 26, 26, 26, 26, 26, 28, 28, 28, 28, 30, 28, 30, 30, 30, 30, 30, 30, 32, 32, 32, 32, 32, 32, 32, 34, 34, 34, 34, 34, 36, 34, 34, 36, 36
Offset: 2

Views

Author

Charles L. Hohn, Jul 16 2025

Keywords

Comments

It is provable that all such walks must be even in total length. It is also provable that 3-segment closed walks are impossible for n < 6, and conjectured that a(n) for all n >= 6 are produced by 3-segment walks.
For n = 2, the walk segments are the hypotenuses of noncongruent primitive Pythagorean triangles.
The offset is 2, because even though the graph could be defined in dimension 1 (the vertices would be the points of Z, with each point connected to its two neighbors), it would not contain any closed paths.
Adding a constraint that the diagonal segments must all have the same length gives A385525.

Examples

			a(2) = 60 because [3, 4] + [5, 12] + [-15, 8] + [7, -24] = [0, 0] and segment lengths 5 + 13 + 17 + 25 = 60, which is the smallest example for n = 2.
a(3) = 28: [2, 2, 1] + [-3, -2, -6] + [-7, 4, 4] + [8, -4, 1] = [0, 0, 0] and 3 + 7 + 9 + 9 = 28.
a(4) = 20: [1, 1, 1, 1] + [-1, -2, -2, -4] + [-5, -3, -1, 1] + [5, 4, 2, 2] = [0, 0, 0, 0] and 2 + 5 + 6 + 7 = 20.
		

Crossrefs

Cf. A385525.
Cf. A020882 (diagonals in 2 dimensions), A096910 (diagonals in 3 dimensions).
Showing 1-2 of 2 results.