OFFSET
1,1
COMMENTS
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.
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.
EXAMPLE
The pattern of the ladders. Example for the first three:
.
|_|
| | ___ 1 missing
|_| rung
| |
|_| | | ___ 2 missing
| | ___ 1 missing |_| rungs
|_| rung | |
|_| | | | | ___ 3 missing
| | ___ 1 missing | | ___ 2 missing | | rungs
|_| rung |_| rungs |_|
| | | | | |
.
The 2 rung The 3 rung The 4 rung
ladder ladder ladder
.
Constructing the compound ladder:
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.
.
Exploded view of the assembly: Front view:
.
|_| |_|
| | | |
|_| |_|
| | | |
| | | |
|_| |_|
|_| | | | |
| | | | | |
|_| | | | |
| | |_| |_|
| | | | | |
|_| | | | |
| | | | | |
|_| | | |_| | | |_|
| | | | | | |_| ___ No clashing ___ |_|
|_| |_| ___ Clashing |_| | | rungs |_|
| | | | rungs | | | | | |
| | | | | | | | ___ Next ladder ___ | |
|_| | | |_| | | to be tried |_|
|_| | | | | |_| | | | | here |_|
| | | | |_| | | | | |_| (including |_|
|_| | | | | |_| | | | | the 5 rung |_|
| | |_| | | |_| one) |_|
|_| | | | | 5 rung |_| | | | | 6 rung |_|
| | |_| does | | |_| does |_|
|_| | | 4 rung not |_| | | 4 rung fit |_|
| | fit | | | |
3 rung 3 rung
2 rung 2 rung n = 4 ladders
assembled with
8 climbable
rungs achieved
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Tamas Sandor Nagy, Oct 18 2024
EXTENSIONS
a(11) onwards from Andrew Howroyd, Oct 18 2024
STATUS
approved