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.

A380868 Number of distinct solutions {n1, n2, n3, n4} to the problem of forming a rectangle with sides made of linked rods of length 1, ..., n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 3, 0, 0, 0, 1, 0, 0, 3, 0, 0, 0, 0, 1, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 0, 6, 0, 0, 0, 1, 0, 0, 3, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 6, 0, 0, 0, 10, 0, 0, 3, 0, 0, 0, 0, 3, 0, 0, 1, 0, 0, 0, 15
Offset: 1

Views

Author

M. F. Hasler, Mar 14 2025

Keywords

Comments

A solution to the problem is given by n1 > n2 > n3 > n4 >= 0 such that T(n) = 2*(A+B) with side lengths A = T(n1) - T(n2) = T(n3) - T(n4) and B = T(n2) - T(n3), where T = A000217.
When n4 = 0, this means that the rods of length 1 and n meet in a corner. When there are two consecutive n_k's (e.g. n1 = 7, n2 = 6 for n = 8) this means that one side is made of one single rod, of length equal to the larger of the two n_k's
Nonzero terms are at indices listed in A380867.
From Daniel Mondot, Mar 17 2025: (Start)
Conjecture 1: All terms are triangular numbers.
Conjecture 2: All triangular numbers will eventually appear in this sequence.(End)

Examples

			The only solution for n = 8 is depicted in A380867.
a(n = 20) = 3 is the first case where we have several distinct solutions,
 {5, 11, 15, 18}, {0, 11, 14, 18} and {0, 5, 14, 15}, The corresponding triangular numbers, whose differences give the side lengths, are {15, 66, 120, 171}, {0, 66, 105, 171} and {0, 15, 105, 120}.
		

Crossrefs

Cf. A000217 (triangular numbers), A334720 (2D cycles on square lattice).
Cf. A380867 (indices of nonzero terms).

Programs

  • PARI
    T(n)=n*(n+1)/2 \\ = A000217
    apply( {A380868(n)=my(Tn=T(n), T1, T2, T3, T4, n3, n4, cnt=0); Tn%2==0 && forstep(n1=n-1, 3, -1, T1=T(n1); forstep(n2=n1-1, 2, -1, (B = Tn/2 - A = T1 - T2 = T(n2)) < 3 && break; iferr((1+n3=sqrtint(2*T3 = T2-B))*n3==2*T3 && (1+n4=sqrtint(2*T4 = T3-A))*n4==2*T4 && cnt++, E, ))); cnt}, [1..99])