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.

A165964 Number of circular permutations of length n without increasing or decreasing 3-sequences.

Original entry on oeis.org

1, 1, 0, 4, 16, 86, 542, 3932, 32330, 297438, 3028320, 33814454, 410954878, 5400878692, 76329470882, 1154445436334, 18606430004984, 318369275913710, 5764046146341198, 110091446931897180, 2212282487296335866, 46658484076867264702, 1030533208360458081232
Offset: 1

Views

Author

Isaac Lambert, Oct 07 2009

Keywords

Comments

Circular permutations are permutations whose indices are from the ring of integers modulo n. Increasing 3-sequences are of the form i,i+1,i+2, while decreasing 3-sequences are of the form i,i-1,i-2.

Examples

			For n=4 the a(4)=4 solutions are (0,1,3,2), (0,2,1,3), (0,2,3,1), and (0,3,1,2).
		

Crossrefs

Formula

a(n) = A095816(n-1) - 2 * Sum_{i=1..[(n+1)/3]} (A095816(n-3*i) - A095816(n-1-3*i)). [Corrected by Sean A. Irvine, Jul 07 2025]

Extensions

Edited and more terms added by Max Alekseyev, Jun 14 2011