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.

A334720 Number of 2-dimensional closed-loop self-avoiding paths on a square lattice where each path consists of steps with incrementing length from 1 to n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 8, 24, 0, 0, 40, 112, 0, 0, 1376, 2008, 0, 0, 21720, 60848, 0, 0, 635544, 1517368, 0, 0, 20008456, 46010640, 0, 0, 640819936, 1571759136, 0, 0, 22704325648, 55436103264
Offset: 1

Views

Author

Scott R. Shannon, May 08 2020

Keywords

Comments

This sequence gives the number of closed-loop self avoiding walks on a 2D square lattice where the walk starts with a step length of 1 which then increments by 1 after each step up until the step length is n. No closed-loop path is possible until n = 7.
Like A010566 all possible paths are counted, including those that are equivalent via rotation and reflection.
For n = 8, 15, 20, 24, 27, 32, 35, 39, 44, ... = A380867, the path can be a rectangle. The first two cases are illustrated through the "Images" link from Scott R. Shannon. These numbers correspond to triangular numbers T(n) for which there are n1 > n2 > n3 > n4 >= 0 such that T(n) = 2(A+B) for A = T(n1) - T(n2) = T(n3) - T(n4) and B = T(n2) - T(n3). See A380867 for more. - M. F. Hasler, Mar 14 2025

Examples

			a(1) to a(6) = 0 as no closed-loop is possible.
a(7) = 8 as there is one path which forms a closed loop which can be walked in 8 different ways on a 2D square lattice. The path is:
.
             5
   *---.---.---.---.---*
   |                   |
   .                   .
   |                   |
   .                   .  4
   |                   |
6  .                   .
   |                   |     3
   .                   *---.---.---*
   |                               |
   .                               . 2
   |                               |
   *---.---.---.---.---.---.---X---*
                 7               1
.
See the attached link for text images of the closed loops for other n values.
		

Crossrefs

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])

A382268 Numbers k such that a right triangle can be formed from a chain of linked rods of lengths 1, 2, 3, ..., k, with the perimeter equal to the total length.

Original entry on oeis.org

15, 20, 24, 35, 39, 44, 48, 55, 56, 63, 75, 76, 80, 84, 91, 95, 99, 104, 111, 119, 120, 132, 135, 140, 143, 144, 152, 155, 168, 175, 176, 187, 188, 195, 203, 207, 215, 216, 219, 224, 252, 259, 260, 264, 272, 275, 279, 287, 288, 296, 299, 308, 315, 320, 324, 335, 351, 360
Offset: 1

Views

Author

Ali Sada and Daniel Mondot, Mar 19 2025

Keywords

Comments

The corresponding perimeters T(a(n)) must be in the intersection of T = A000217 (triangular numbers) with A010814 (perimeters of integer sided right triangles). A number k is in the sequence if there exists a solution {k1, k2, k3} with k > k1 > k2 > k3 >= 0 such that for a < b < c in { T(k1) - T(k2), T(k2) - T(k3), T(k) - T(k1) + T(k3) } one has a^2 + b^2 = c^2. - M. F. Hasler, Mar 20 2025

Examples

			The first triangle is when k = 15. The segments are [6+7+8+9+10] [11+12+13+14] [15+1+2+3+4+5]. The sums of the segments are (40, 50, 30), which is 10 times the primitive right triangle (3, 4, 5).
The second term, k = 20, corresponds to 5 distinct solutions:
  S1 = {18, 16, 9}: a = 9+...+1 + 20+19 = 84, b = 18+17 = 35, c = 16+...+10 = 91,
  S2 = {17, 11, 3}: a = 20+19+18 + 3+2+1 = 63, c = 17+...+12 = 87, b = 11+...+4 = 60,
  S3 = {17, 11, 2}: a = 20+19+18 + 2+1 = 60, c = 17+...+12 = 87, b = 11+...+3 = 63,
  S4 = {16, 9, 4}: a = 20+...+17 + 4+...+1 = 84, c = 16+...+10 = 91, b = 9+...+5 = 35,
  S5 = {15, 8, 1}: c = 20+...+16 + 1 = 91, a = 15+...+9 = 84, b = 8+...+2 = 35.
We note that S2 and S3, and S1, S4 and S5, have the same side lengths, but different decompositions.
		

Crossrefs

Programs

  • PARI
    select( {is_A382268(n)=my(Tn=n*(n+1)\2,T1,T2,S); Tn%2==0 && is_A005279(Tn\2) && forstep(n1=n-1,sqrtint(Tn-1)+1,-1, T1=n1*(n1+1)\2; forstep(n2=n1-1,sqrtint(2*T1-Tn-1)+1,-1, T2=n2*(n2+1)\2; forstep(n3=n2-1,0,-1, #(S=Set([Tn-T1+S=n3*(n3+1)\2,T2-S,T1-T2]))>2 && S[3]^2 == S[1]^2+S[2]^2 && return(S))))}, [1..100])\\ M. F. Hasler, Mar 22 2025

A382605 Number of distinct solutions to the problem of folding in half a chain of linked rods of length 1, ..., n.

Original entry on oeis.org

0, 0, 1, 1, 0, 0, 1, 2, 0, 0, 1, 1, 0, 0, 2, 1, 0, 0, 1, 3, 0, 0, 1, 2, 0, 0, 3, 1, 0, 0, 1, 2, 0, 0, 4, 1, 0, 0, 4, 1, 0, 0, 1, 4, 0, 0, 1, 2, 0, 0, 3, 1, 0, 0, 3, 3, 0, 0, 1, 1, 0, 0, 2, 1, 0, 0, 1, 3, 0, 0, 1, 1, 0, 0, 4, 1, 0, 0, 1, 4, 0, 0, 1, 5, 0, 0, 3, 1, 0, 0, 1, 3, 0, 0, 2, 1, 0, 0, 6, 1
Offset: 1

Views

Author

Daniel Mondot, Mar 31 2025

Keywords

Comments

In order to be able to fold such chain in half, the total length of the chain (A000217(n)) has to be even, which is true when n=3 (mod 4) or n=0 (mod 4).
Conjecture: Whenever the length of the chain is even, there is at least one solution. That makes A154708 the sequence that lists numbers k that have at least one solution.

Examples

			A chain of 7 rods of length 1 to 7, can be folded in half in only one way: 2+3+4+5 on one side, 6+7+1, on the other, both sides being 14 in total length. Therefore a(7) = 1.
		

Crossrefs

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

Original entry on oeis.org

9, 90, 125, 153, 189, 440, 819, 989, 1295, 1394, 1484, 1701, 2079, 2448, 2925, 3024, 4004, 5453, 6174, 7865, 8910, 13509, 13689, 13923, 16235, 19683, 20294, 21824, 24804, 26649, 32760, 33488, 37169, 37925, 39024, 40733, 42704, 44225, 44289, 47915, 48734, 52325, 97335, 101870
Offset: 1

Views

Author

Daniel Mondot, Apr 01 2025

Keywords

Comments

For all known terms (n<157), there is only one solution, except for 125 and 158949 which both have 2 solutions.
Conjecture: Out of some linked rods of length 1, 2...k, we can fold them in half (digon), or make equilateral triangles, but no other regular polygons (squares, regular pentagons, etc...) can be made.

Examples

			For k=9, the sides of the triangle are 15 in length: [4+5+6], [7+8] and [9+1+2+3]. Therefore 9 is in the sequence.
For k=90, the sides of the triangle are 1365 in length: [16+...+54], [55+...+75] and [76+...+90 + 1+...+15]. Therefore 90 is in the sequence.
The 2 solutions for 125 are:
    [3+4+...+71+72], [73+74+...+101+102] and [103+104+...+124+125 +1+2]
and [58+...+92], [93+...+117] and [118+...+125 + 1+...+58], all sides 2625 in length.
		

Crossrefs

A380869 Numbers k such that one can make a rectangle from a chain of linked rods of lengths 1, 2, 3, ..., k, with perimeter equal to the total length, and with one side consisting of a single rod.

Original entry on oeis.org

8, 15, 20, 24, 27, 35, 39, 80, 84, 104, 143, 215, 220, 252, 264, 351, 363, 459, 476
Offset: 1

Views

Author

Ali Sada and M. F. Hasler, Mar 14 2025

Keywords

Comments

Subsequence of A380867, with the additional requirement in the set {n1, n2, n3, n4} corresponding to the solutions (cf. there), there are two consecutive integers.

Examples

			The smallest such number is a(1) = 8, for which we have (n1..n4) = (2, 4, 6, 7), that is, the rectangle:
    o--+--o--o--+--+--+--+--+--+--+--o
    |  2   1             8           |
    |3                               |
    |                                |
    o                                7
    |                                |
    |4                               |
    |                                |
    |       5               6        |
    o--+--+--+--+--o--+--+--+--+--+--o
We see that one of the sides, of length 7, is made of only one single rod.
		

Crossrefs

Cf. A000217 (triangular numbers), A334720 (2D cycles on square lattice).
Cf. A380867 (contains this as a subsequence), A380868 (total number of solutions for given n).

Programs

  • PARI
    T(n)=n*(n+1)/2 \\ = A000217
    select( {is_A380869(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 && vecmin([n1-n2,n2-n3,n3-n4])==1 && return(n), E, )))}, [1..99])
Showing 1-6 of 6 results.