|
|
A087035
|
|
Maximum value taken on by f(P)=sum(i=1..n, p(i)*p(n+1-i) ) as {p(1),p(2),...,p(n)} ranges over all permutations P of {1,2,3,...n}.
|
|
4
|
|
|
1, 4, 13, 28, 53, 88, 137, 200, 281, 380, 501, 644, 813, 1008, 1233, 1488, 1777, 2100, 2461, 2860, 3301, 3784, 4313, 4888, 5513, 6188, 6917, 7700, 8541, 9440, 10401, 11424, 12513, 13668, 14893, 16188, 17557, 19000, 20521, 22120, 23801
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
The corresponding minimum value of f(P) is given by A000292(n)=binomial(n+3,3).
The number of distinct values of f(P) is given by A087034.
Also, number of (w,x,y) with all terms in {0,...,n-1} and 2|w-x| <= max(w,x,y)-min(w,x,y). For a guide to related sequences, see A212959. - Clark Kimberling, Jun 10 2012
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 3*a(n-1)-2*a(n-2)-2*a(n-3)+3*a(n-4)-a(n-5).
G.f.: (x + x^2 + 3*x^3 - x^4)/(((1 - x)^4)*(1 + x)).
a(n+1) + A213045(n) = (n+1)^3. (End)
a(n) = (2*(n-1)*(n+1)*(2*n+3)-3*(-1)^n+9)/12. - Bruno Berselli, Jun 11 2012
|
|
EXAMPLE
|
a(3)=13, since f takes on the values 10 and 13: f({1,2,3})=10, f({1,3,2)}=13, f({2,1,3})=13, f({2,3,1})=13, f({3,1,2})=13 and f({3,2,1})=10.
|
|
MATHEMATICA
|
t = Compile[{{n, _Integer}}, Module[{s = 0},
(Do[If[Max[w, x, y] - Min[w, x, y] >= 2 Abs[w - x],
s = s + 1],
{w, 0, n}, {x, 0, n}, {y, 0, n}]; s)]];
m = Map[t[#] &, Range[0, 45]]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Merged with a sequence of Clark Kimberling by Max Alekseyev, Jun 27 2012
|
|
STATUS
|
approved
|
|
|
|