cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A200067 Maximum sum of all products of absolute differences and distances between element pairs among the integer partitions of n.

This page as a plain text file.
%I A200067 #38 Mar 27 2025 11:31:48
%S A200067 0,0,0,1,3,6,12,20,30,45,63,84,112,144,180,225,275,330,396,468,546,
%T A200067 637,735,840,960,1088,1224,1377,1539,1710,1900,2100,2310,2541,2783,
%U A200067 3036,3312,3600,3900,4225,4563,4914,5292,5684,6090,6525,6975,7440,7936,8448
%N A200067 Maximum sum of all products of absolute differences and distances between element pairs among the integer partitions of n.
%C A200067 Also the maximum sum of weighted inversions among the compositions of n where weights are products of absolute differences and distances between the element pairs which are not in sorted order.
%C A200067 a(n) is divisible by at least one triangular number >1 for n>=4. Thus 3 is the only prime in this sequence.
%H A200067 Alois P. Heinz, <a href="/A200067/b200067.txt">Table of n, a(n) for n = 0..1000</a>
%H A200067 <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (2,-1,2,-4,2,-1,2,-1).
%F A200067 G.f.: x^3*(1+x)*(1+x^2)/((1+x+x^2)^2*(x-1)^4).
%F A200067 a(n) = max_{k=0..n} (n-k-1)*k*(k+1)/2.
%F A200067 a(n) = (n-k-1)*k*(k+1)/2 with k = max(0, floor((2*n-1)/3)), or k = A004396(n-1) for n>0.
%F A200067 27*a(n) = (2*n-1)*(n^2-n-1) - A132677(n) - 3*(-1)^n*A099254(n-1). - _R. J. Mathar_, Mar 14 2025
%e A200067 a(2) =  0: [1,1]-> 0, [2]-> 0; the maximum is 0.
%e A200067 a(3) =  1: [1,1,1]-> 0, [2,1]-> 1, [3]-> 0; the maximum is 1.
%e A200067 a(4) =  3: [1,1,1,1]-> 0, [2,1,1]-> 1+2 = 3, [2,2]->0, [3,1]->2, [4]->0.
%e A200067 a(5) =  6: [2,1,1,1]-> 1+2+3 = 6, [3,1,1]-> 2 + 2*2 = 2*(1+2) = 6.
%e A200067 a(6) = 12: [3,1,1,1]-> 2 + 2*2 + 2*3 = 2*(1+2+3) = 12.
%e A200067 a(7) = 20: [3,1,1,1,1]-> 2 + 2*2 + 2*3 + 2*4 = 2*(1+2+3+4) = 20.
%e A200067 a(8) = 30: [3,1,1,1,1,1]-> 2*(1+2+3+4+5) = 30, [4,1,1,1,1]-> 3*(1+2+3+4) = 30.
%p A200067 a:= n-> (k-> (n-k-1)*k*(k+1)/2)(max(0, floor((2*n-1)/3))):
%p A200067 seq(a(n), n=0..50);
%t A200067 a[n_] := Max[Table[(n-k-1)*k*(k+1)/2, {k, 0, n}]]; Table[a[n], {n, 0, 50}] (* _Jean-François Alcover_, Nov 22 2013, after _Alois P. Heinz_ *)
%Y A200067 Cf. A000217, A004396, A200068.
%K A200067 nonn,easy
%O A200067 0,5
%A A200067 _Alois P. Heinz_, Nov 13 2011