OFFSET
3,2
LINKS
Herman Jamke (hermanjamke(AT)fastmail.fm), Nov 08 2006, Table of n, a(n) for n = 3..38
Samuel Herman, Eirini Poimenidou, Orbits of Hamiltonian Paths and Cycles in Complete Graphs, arXiv:1905.04785 [math.CO], 2019.
H. Fripertinger, Enumeration in musical theory, Séminaire Lotharingien de Combinatoire, B26a (1991), 14 pp.
FORMULA
(1/4) [(n-1)!+(n-1)!! ] if n odd, (1/4) [(n-1)!+(n/2+1)(n-2)!! ] if even.
MATHEMATICA
a[n_] := If[OddQ[n], (n-1)! + (n-1)!!, (n-1)! + (n/2 + 1)*(n-2)!!] / 4;
Table[a[n], {n, 3, 38}] (* Jean-François Alcover, Aug 01 2016 *)
PROG
(PARI) doubfact(n)=if(n<2, 1, n*doubfact(n-2));
for(n=3, 50, if(n%2==1, print1(((n-1)!+doubfact(n-1))/4, ", "), print1(((n-1)!+(n/2+1)*doubfact(n-2))/4, ", "))) \\ Herman Jamke (hermanjamke(AT)fastmail.fm), Nov 02 2006
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ralf Stephan, Sep 27 2004
EXTENSIONS
More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), Nov 02 2006
STATUS
approved