login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Triangle T(n,k) in which the n-th row encodes how to hang a picture by wrapping rope around n nails using a polynomial number of twists, such that removing one nail causes the picture to fall; n>=1, 1<=k<=A073121(n).
2

%I #43 Feb 06 2023 06:49:42

%S 1,1,2,-1,-2,1,2,-1,-2,3,2,1,-2,-1,-3,1,2,-1,-2,3,4,-3,-4,2,1,-2,-1,4,

%T 3,-4,-3,1,2,-1,-2,3,2,1,-2,-1,-3,4,5,-4,-5,3,1,2,-1,-2,-3,2,1,-2,-1,

%U 5,4,-5,-4,1,2,-1,-2,3,2,1,-2,-1,-3,4,5,-4,-5,6,5

%N Triangle T(n,k) in which the n-th row encodes how to hang a picture by wrapping rope around n nails using a polynomial number of twists, such that removing one nail causes the picture to fall; n>=1, 1<=k<=A073121(n).

%C In step k the rope has to be wrapped around nail |T(n,k)| clockwise if T(n,k)>0 and counterclockwise if T(n,k)<0.

%C 1 or (-1) appears A062383(n-1) times in row n.

%C n or (-n) appears A053644(n) times in row n.

%H Alois P. Heinz, <a href="/A254575/b254575.txt">Rows n = 1..30, flattened</a>

%H E. D. Demaine, M. L. Demaine, Y. N. Minsky, J. S. B. Mitchell, R. L. Rivest, M. Patrascu, <a href="https://arxiv.org/abs/1203.3602">Picture-Hanging Puzzles</a>, arXiv:1203.3602 [cs.DS], 2012-2014.

%e Triangle T(n,k) begins:

%e 1;

%e 1, 2, -1, -2;

%e 1, 2, -1, -2, 3, 2, 1, -2, -1, -3;

%e 1, 2, -1, -2, 3, 4, -3, -4, 2, 1, -2, -1, 4, 3, -4, -3;

%p r:= s-> seq(-s[-k], k=1..nops(s)):

%p T:= proc(n) option remember; `if`(n=1, 1, (m->

%p ((x, y)-> [x[], y[], r(x), r(y)][])([T(m)],

%p map(h-> h+sign(h)*m, [T(n-m)])))(iquo(n+1, 2)))

%p end:

%p seq(T(n), n=1..7);

%t r[s_List] := -Reverse[s];

%t T[1] = {1}; T[n_] := T[n] = Module[{ m = Quotient[n+1, 2]}, Function[{x, y}, {x, y, r[x], r[y]} // Flatten][T[m], Function[h, h + Sign[h]*m] /@ T[n - m]]];

%t Table[T[n], {n, 1, 7}] // Flatten (* _Jean-François Alcover_, Nov 06 2017, after _Alois P. Heinz_ *)

%Y Row sums give A063524.

%Y Cf. A053644, A062383, A073121.

%K sign,tabf,look

%O 1,3

%A _Alois P. Heinz_, Feb 01 2015