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.

A377171 Number of rungs, k, in deficient ladders to be assembled together in that order, to make a ladder that can be climbed to some height. Details are in the Comments.

This page as a plain text file.
%I A377171 #27 Nov 10 2024 17:32:02
%S A377171 2,3,4,6,7,10,18,13,15,24,45,56,65,81,89,114,179,29,161,281,302,362,
%T A377171 383,424,356,541,735,455,1042,1173,1007,1347,750,1586,1501,2040,2727,
%U A377171 2435,2491,3211,3911,3407,5,4211,4753,5273,5351,6051,7191,7907,8541,9200,10053,13552,10377
%N A377171 Number of rungs, k, in deficient ladders to be assembled together in that order, to make a ladder that can be climbed to some height. Details are in the Comments.
%C A377171 Each distinct ladder has k rungs and k*(k-1)/2 missing rungs. A ladder has one rung at the bottom and one at the top. The missing rungs of the ladders have a pattern. The number of missing rungs between rungs from bottom to top are (1), (2,1), (3,2,1), and so on.
%C A377171 The rule is to select the smallest suitable ladder and place its bottom rung in line with the lowest missing rung of the ladder assembly such that none of its rungs is in line with any other rung of the assembly. No ladder is to be turned upside down.
%e A377171 The pattern of the ladders. Example for the first three:
%e A377171 .
%e A377171                                                |_|
%e A377171                                                | | ___ 1 missing
%e A377171                                                |_|       rung
%e A377171                                                | |
%e A377171                          |_|                   | | ___ 2 missing
%e A377171                          | | ___ 1 missing     |_|       rungs
%e A377171                          |_|       rung        | |
%e A377171    |_|                   | |                   | | ___ 3 missing
%e A377171    | | ___ 1 missing     | | ___ 2 missing     | |       rungs
%e A377171    |_|       rung        |_|       rungs       |_|
%e A377171    | |                   | |                   | |
%e A377171 .
%e A377171 The 2 rung            The 3 rung            The 4 rung
%e A377171   ladder                ladder                ladder
%e A377171 .
%e A377171 Constructing the compound ladder:
%e A377171 First, we take the smallest ladder with two rungs. Then we select the next smallest one, which has three rungs. We place its bottom rung in line with the empty place on the first ladder. So we obtain a climbable three-rung ladder assembly. Next, we observe the first missing rung at level 4, to which we try the four rung ladder with success because no rungs clash. The lowest empty place is now at rung 6, to which we try the five-rung ladder. This however will clash with a rung of the assembly. So we fit the next smallest available one with six rungs, which fits well. Any failed ladder should always be tried at later stages where it may fit properly.
%e A377171 .
%e A377171 Exploded view of the assembly:                                    Front view:
%e A377171 .
%e A377171                                                |_|                     |_|
%e A377171                                                | |                     | |
%e A377171                                                |_|                     |_|
%e A377171                                                | |                     | |
%e A377171                                                | |                     | |
%e A377171                                                |_|                     |_|
%e A377171                     |_|                        | |                     | |
%e A377171                     | |                        | |                     | |
%e A377171                     |_|                        | |                     | |
%e A377171                     | |                        |_|                     |_|
%e A377171                     | |                        | |                     | |
%e A377171                     |_|                        | |                     | |
%e A377171                     | |                        | |                     | |
%e A377171               |_|   | |                  |_|   | |                     |_|
%e A377171               | |   | |                  | |   |_| ___ No clashing ___ |_|
%e A377171               |_|   |_| ___ Clashing     |_|   | |       rungs         |_|
%e A377171               | |   | |       rungs      | |   | |                     | |
%e A377171               | |   | |                  | |   | | ___ Next ladder ___ | |
%e A377171               |_|   | |                  |_|   | |     to be tried     |_|
%e A377171         |_|   | |   | |            |_|   | |   | |        here         |_|
%e A377171         | |   | |   |_|            | |   | |   |_|     (including      |_|
%e A377171         |_|   | |   | |            |_|   | |   | |     the 5 rung      |_|
%e A377171         | |   |_|                  | |   |_|              one)         |_|
%e A377171   |_|   | |   | | 5 rung     |_|   | |   | | 6 rung                    |_|
%e A377171   | |   |_|         does     | |   |_|         does                    |_|
%e A377171   |_|   | | 4 rung  not      |_|   | | 4 rung  fit                     |_|
%e A377171   | |               fit      | |                                       | |
%e A377171       3 rung                     3 rung
%e A377171 2 rung                     2 rung                                 n = 4 ladders
%e A377171                                                                   assembled with
%e A377171                                                                   8 climbable
%e A377171                                                                   rungs achieved
%o A377171 (PARI) seq(n)={my(M=Map(), K=Map(), a=vector(n), b=0); for(n=1, #a, while(mapisdefined(M,b), b++); my(f=1, k=1); while(f, k++; if(!mapisdefined(K,k), f=0; my(s=b); for(i=0, k-2, s += k-i; if(mapisdefined(M,s),f=1;break)); if(!f, for(i=2, k, mapput(M,s,1); s-=i); mapput(M,s,1)))); a[n]=k; mapput(K,k,1)); a} \\ _Andrew Howroyd_, Oct 18 2024
%Y A377171 Cf. A351153 (rung positions of the ladders from bottom up).
%K A377171 nonn
%O A377171 1,1
%A A377171 _Tamas Sandor Nagy_, Oct 18 2024
%E A377171 a(11) onwards from _Andrew Howroyd_, Oct 18 2024