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.

A375301 Triangle T(n,k) read by rows with row n equal to the unique permutation pi_n of [1, ..., n] such that k + pi_n(k) is a power of 2 for 1 <= k <= n.

This page as a plain text file.
%I A375301 #5 Aug 25 2024 09:26:41
%S A375301 1,1,2,3,2,1,3,2,1,4,1,2,5,4,3,1,6,5,4,3,2,7,6,5,4,3,2,1,7,6,5,4,3,2,
%T A375301 1,8,1,6,5,4,3,2,9,8,7,1,2,5,4,3,10,9,8,7,6,3,2,1,4,11,10,9,8,7,6,5,3,
%U A375301 2,1,12,11,10,9,8,7,6,5,4,1,2,13,12,11,10,9,8,7,6,5,4,3
%N A375301 Triangle T(n,k) read by rows with row n equal to the unique permutation pi_n of [1, ..., n] such that k + pi_n(k) is a power of 2 for 1 <= k <= n.
%H A375301 Zhi-Wei Sun, <a href="https://doi.org/10.1007/s10801-021-01028-8">On permutations of {1, ..., n} and related topics</a>, J Algebr Comb 54, 893-912 (2021); Theorem 1.2, page 895.
%e A375301 The triangle begins
%e A375301   1,
%e A375301   1, 2,
%e A375301   3, 2, 1,
%e A375301   3, 2, 1, 4,
%e A375301   1, 2, 5, 4, 3,
%e A375301   1, 6, 5, 4, 3, 2,
%e A375301   7, 6, 5, 4, 3, 2, 1,
%e A375301   7, 6, 5, 4, 3, 2, 1, 8,
%e A375301   ...
%e A375301 Row 5: [1, 2, 5, 4, 3] + [1, 2, 3, 4, 5] = [2, 4, 8, 8, 8]; only powers of 2 in the vector of sums.
%o A375301 (PARI) a375301_row(n) = forperm(n, p, my(f=1); for(k=1, n, my(s=p[k]+k); if(2^valuation(s,2)!=s, f=0; break)); if(f==1, return(Vec(p))))
%Y A375301 A375302 gives the rank of row n in lexicographically ordered permutations of [n].
%Y A375301 Cf. A000079.
%K A375301 nonn,tabl
%O A375301 1,3
%A A375301 _Hugo Pfoertner_, Aug 25 2024