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.

A338849 Triangle read by rows: T(n,k) is the number of permutations of k elements from [1..n] in a circle where adjacent values cannot be consecutive modulo n, rotations are distinct.

This page as a plain text file.
%I A338849 #30 Jul 23 2025 16:02:39
%S A338849 1,1,1,1,2,0,1,3,0,0,1,4,4,0,0,1,5,10,0,0,10,1,6,18,12,24,60,36,1,7,
%T A338849 28,42,112,280,420,322,1,8,40,96,336,1040,2400,3696,2832,1,9,54,180,
%U A338849 792,3060,9540,22428,35280,27954,1,10,70,300,1600,7540,29880,95340,229280,369540,299260
%N A338849 Triangle read by rows: T(n,k) is the number of permutations of k elements from [1..n] in a circle where adjacent values cannot be consecutive modulo n, rotations are distinct.
%C A338849 In a convex n-gon, the number of paths using k-1 diagonals and k non-repeated vertices, start and end vertices are not connected by a side.
%F A338849 T(n,k) = n*(A338526(n-1,k-1)-2*S(n-1,k-1)+Z2(n-1,k-1)) for k>0 except T(2,2)=0, T(n,0)=1, where Z2(n,k) = Z1(n,k) except Z2(n,1)=2, where Z1(n,k) = S(n-1,k-1)-Z(n-1,k-1) for k>0 except Z1(2,2)=0, Z1(n,0)=0, where S(n,k) = 2*A338526(n-1,k-1)-S(n-1,k-1) for k>0, S(n,0)=0.
%e A338849 n\k  0    1    2    3    4    5    6    7    8
%e A338849 0    1
%e A338849 1    1    1
%e A338849 2    1    2    0
%e A338849 3    1    3    0    0
%e A338849 4    1    4    4    0    0
%e A338849 5    1    5    10   0    0    10
%e A338849 6    1    6    18   12   24   60   36
%e A338849 7    1    7    28   42   112  280  420  322
%e A338849 8    1    8    40   96   336  1040 2400 3696 2832
%Y A338849 Cf. A011973, A034807, A338526, A338838, A000166.
%K A338849 nonn,tabl
%O A338849 0,5
%A A338849 _Xiangyu Chen_, Nov 12 2020