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.

A380867 Numbers k such that one can make a rectangle from a chain of linked rods of length 1, 2, 3, ..., k, with perimeter equal to the total length.

This page as a plain text file.
%I A380867 #15 May 15 2025 21:51:54
%S A380867 8,15,20,24,27,32,35,39,44,48,51,55,56,63,68,75,80,84,87,92,95,99,104,
%T A380867 111,115,116,119,120,123,124,128,132,135,140,143,144,147,152,155,159,
%U A380867 160,164,168,171,175,176,183,184,188,195,200,203,204,207,208,212,215,216,219,220,224,231,235,236
%N A380867 Numbers k such that one can make a rectangle from a chain of linked rods of length 1, 2, 3, ..., k, with perimeter equal to the total length.
%C A380867 A more explicit description: Numbers n for which exist n1 > n2 > n3 > n4 >= 0 such that T(n) = 2*(A+B) with A = T(n1) - T(n2) = T(n3) - T(n4) and B = T(n2) - T(n3), where T = A000217.
%C A380867 If in the above solution {n1, ..., n4} we have n4 = 0, this means that the first and last rods (length 1 and n) meet in a corner. This first happens for n = 20 where we can have {0, 11, 14, 18} or {0, 5, 14, 15} with this property (and a third solution without this property).
%C A380867 If in such a solution we have two consecutive integers, e.g., n1 = n2 + 1, this means that one side of the rectangle is made of one single rod, here n1. (This happens in the second solution above with n1 = 15, and in the EXAMPLE n = 8, with n1 = 7.)
%H A380867 Daniel Mondot, <a href="/A380867/b380867.txt">Table of n, a(n) for n = 1..10000</a>
%e A380867 The smallest such number is a(1) = 8, for which we have (n1..n4) = (2, 4, 6, 7), that is, the rectangle:
%e A380867     o--+--o--o--+--+--+--+--+--+--+--o
%e A380867     |  2   1             8           |
%e A380867     |3                               |
%e A380867     |                                |
%e A380867     o                                7
%e A380867     |                                |
%e A380867     |4                               |
%e A380867     |                                |
%e A380867     |       5               6        |
%e A380867     o--+--+--+--+--o--+--+--+--+--+--o
%e A380867 This is a special case of the 2-dimensional closed-loop self-avoiding paths on a square lattice considered in A334720.
%o A380867 (PARI) T(n)=n*(n+1)/2 /* = A000217 */
%o A380867 select( {is_A380867(n)=my(Tn=T(n), T1, T2, T3, T4, n3, n4); 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 && return(n), E,)))}, [1..99])
%Y A380867 Cf. A000217 (triangular numbers), A334720 (2D cycles on square lattice).
%K A380867 nonn,nice
%O A380867 1,1
%A A380867 _Ali Sada_ and _M. F. Hasler_, Mar 14 2025