OFFSET
0,1
COMMENTS
Singmaster's problem: "A salesman's office is located on a straight road. His n customers are all located along this road to the east of the office, with the office of customer k at distance k from the salesman's office. The salesman must make a driving trip whereby he leaves the office, visits each customer exactly once, then returns to the office.
"Because he makes a profit on his mileage allowance, the salesman wants to drive as far as possible during his trip. What is the maximum possible distance he can travel on such a trip and how many different such trips are there?
"Assume that if the travel plans call for the salesman to visit customer j immediately after he visits customer i, then he drives directly from i to j."
The solution to the first question is twice A002620(n-1); the solution to the second question is a(n).
Number of permutation of [n] with no pair of consecutive elements of the same parity. - Vladeta Jovovic, Nov 26 2007
REFERENCES
A. O. Munagi, Alternating subsets and permutations, Rocky Mountain J. Math. 40 (6) (2010) 1965-1977 doi:10.1216/RJM-2010-40-6-1965, Corollary 3.2.
David Singmaster, Problem 1654, Mathematics Magazine 75 (October 2002). Solution in Mathematics Magazine 76 (October 2003).
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..300
David Singmaster, Problem 1654, Mathematics Magazine 75 p. 317 (October 2002). Solution, Mathematics Magazine 76 p. 321-322 (October 2003).
Shinji Tanimoto, Alternate Permutations and Signed Eulerian Numbers, arXiv:math/0612135 [math.CO], 2006; Ann. Comb. 14 (2010), 355.
MAPLE
a:= proc(n) option remember; `if`(n<2, 2-n,
(n*(3*n-1)*(n-1)*a(n-2) -4*a(n-1))/(12*n-16))
end:
seq(a(n), n=0..30); # Alois P. Heinz, Nov 11 2013
MATHEMATICA
f[n_] := If[EvenQ[n], 2 (n/2)!^2, ((n + 1)/2)! ((n - 1)/2)!]; Table[
f[n], {n, 0, 25}] (* Geoffrey Critzer, Aug 24 2013 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved