OFFSET
1,4
COMMENTS
LINKS
T. D. Noe, Table of n, a(n) for n = 1..10000
EXAMPLE
a(20) = 2, since (20, 18, 16, 14, 12, 10, 8, 6, 4, 2, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19) has two cycles (1, 20, 19, 17, 13, 5, 12, 3, 16, 11) and (2, 18, 15, 9, 4, 14, 7, 8, 6, 10).
PROG
(Python)
from sympy.combinatorics import Permutation
def a(n):
p = list(range(n, 0, -2)) + list(range(1+(n%2), n, 2))
return Permutation([pi-1 for pi in p]).cycles
print([a(n) for n in range(1, 86)]) # Michael S. Branicky, Dec 27 2021
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Ramasamy Chandramouli, Jun 05 2008
STATUS
approved