login
A394241
Minimal value of Sum_{i=1..n-1} p(i)*p(i+1), as p ranges over all permutations of odd numbers {1,3,...,2*n-1}.
1
0, 0, 3, 8, 25, 50, 95, 156, 245, 358, 507, 688, 913, 1178, 1495, 1860, 2285, 2766, 3315, 3928, 4617, 5378, 6223, 7148, 8165, 9270, 10475, 11776, 13185, 14698, 16327, 18068, 19933, 21918, 24035, 26280, 28665, 31186, 33855, 36668, 39637, 42758, 46043, 49488
OFFSET
0,3
COMMENTS
This question originated from generalization of the puzzle 'Low Budget' in the book Mathematical Puzzles and Curiosities.
REFERENCES
I. David, T. Khovanova, and Y. Shpilman, Mathematical Puzzles and Curiosities, World Scientific, 2026, p. 2.
FORMULA
a(n) = (2*n^3 - 6*n^2 + 13*n - 12 + 3*(-1)^n)/3 for n>=2.
a(n) = 4*A026035(n) - 2*n^2 + 3*n - 3.
G.f.: x^2*(2*x^4-3*x^3+7*x^2-x+3)/((x+1)*(x-1)^4).
EXAMPLE
For n=4, the minimum is achieved for permutation 5,3,1,7 of the first four odd numbers. The value is 5*3+3*1+1*7=25. Thus, a(4) = 25.
MATHEMATICA
a[n_]:= (2*n^3 - 6*n^2 + 13*n - 12 + 3*(-1)^n)/3; a[0]=0; a[1]=0; Array[a, 44, 0] (* or *)
CoefficientList[Series[x^2*(2*x^4-3*x^3+7*x^2-x+3)/((x+1)*(x-1)^4) , {x, 0, 43}], x] (* James C. McMahon, Apr 25 2026 *)
PROG
(Python)
def A394241(n): return n*(n*(n-3<<1)+13)//3-(5 if n&1 else 3) if n>1 else 0 # Chai Wah Wu, Apr 24 2026
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Tanya Khovanova and PRIMES STEP junior group, Apr 19 2026
STATUS
approved