OFFSET
1,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
R. Embar, D. Zeilberger,Counting Condorcet, Enum. Combin. Applic. 2 (2022) #S2R22
Wikipedia, Condorcet paradox
Index entries for linear recurrences with constant coefficients, signature (6,-15,20,-15,6,-1).
FORMULA
a(n) = (2/5!)*n*(n-1)*(n+3)*(n+2)*(n+1).
From N. J. A. Sloane, Nov 10 2016: (Start)
a(n) = 2*binomial(n+3,5) = 2*A000389(n+3).
G.f.: 2*x^2/(1-x)^6. (End)
E.g.f.: x^2*(60 + 60*x + 15*x^2 + x^3)*exp(x)/60. - G. C. Greubel, Nov 25 2017
EXAMPLE
For n=2 (three voters), the two possible ways the Condorcet paradox arises are:
1) one voter prefers A to B to C, one prefers B to C to A, and one prefers C to A to B.
2) one voter prefers A to C to B, one prefers C to B to A, and one prefers B to A to C.
MATHEMATICA
Table[(2/5!)*n*(n - 1)*(n + 3)*(n + 2)*(n + 1), {n, 1, 50}] (* G. C. Greubel, Nov 25 2017 *)
a[n_] := 2 Binomial[n + 3, 5]; Array[a, 40] (* or *)
Rest@ CoefficientList[ Series[2 x^2/(x - 1)^6, {x, 0, 40}], x] (* or *)
Range[0, 40]! CoefficientList[ Series[x^2 (x^3 + 15x^2 + 60x + 60) Exp[x]/60, {x, 0, 40}], x] (* or *)
LinearRecurrence[{6, -15, 20, -15, 6, -1}, {0, 2, 12, 42, 112, 252, 504}, 40] (* Robert G. Wilson v, Nov 25 2017 *)
PROG
(PARI) for(n=1, 30, print1((2/5!)*n*(n-1)*(n+3)*(n+2)*(n+1), ", ")) \\ G. C. Greubel, Nov 25 2017
(Magma) [(2/Factorial(5))*n*(n-1)*(n+3)*(n+2)*(n+1): n in [1..30]]; // G. C. Greubel, Nov 25 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Andrew Lohr, Nov 04 2016
STATUS
approved