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.

A165963 Number of permutations of length n without increasing or decreasing modular 3-sequences.

This page as a plain text file.
%I A165963 #6 Jul 22 2025 07:24:06
%S A165963 0,16,80,516,3794,31456,290970,2974380,33311520,405773448,5342413414,
%T A165963 75612301688
%N A165963 Number of permutations of length n without increasing or decreasing modular 3-sequences.
%C A165963 Increasing modular 3-sequences are of the following form: i,i+1,i+2, where arithmetic is modulo n, while correspondingly decreasing modular 3-sequences are of the form i,i-1,i-2, where arithmetic is modulo n.
%H A165963 W. M. Dymacek, I. Lambert, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL14/Dymacek/dymacek5.html">Permutations Avoiding Runs of i, i+1, i+2 or i, i-1, i-2 </a>, J. Int. Seq. 14 (2011) # 11.1.6, Table 1.
%F A165963 Let b(n) be the sequence A165964. Then this sequence a(n)=n(b(n)).
%e A165963 For n=4 there are a(4)=16 solutions, thus there are 4!-a(4)=8 permutations of length 4 with increasing or decreasing modular 3-sequences. These are the permutations (0,1,2,3), (0,3,2,1), (1,2,3,0), (1,0,3,2), (2,3,0,1), (2,1,0,3), (3,0,1,2), and (3,2,1,0).
%Y A165963 Cf. A095816, A165964, A078628.
%K A165963 nonn
%O A165963 3,2
%A A165963 _Isaac Lambert_, Oct 07 2009