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.

A306262 Difference between maximum and minimum sum of products of successive pairs in permutations of [n].

This page as a plain text file.
%I A306262 #57 Jul 24 2025 09:55:17
%S A306262 0,0,0,4,11,24,42,68,101,144,196,260,335,424,526,644,777,928,1096,
%T A306262 1284,1491,1720,1970,2244,2541,2864,3212,3588,3991,4424,4886,5380,
%U A306262 5905,6464,7056,7684,8347,9048,9786,10564,11381,12240,13140,14084,15071,16104,17182
%N A306262 Difference between maximum and minimum sum of products of successive pairs in permutations of [n].
%H A306262 Colin Barker, <a href="/A306262/b306262.txt">Table of n, a(n) for n = 0..1000</a>
%H A306262 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (3,-2,-2,3,-1).
%F A306262 a(n+1) = a(n) + 1/4*((-1+(-1)^(n-1))^2+2*(n-1)*(n+4)) with a(n) = 0 for n <= 2.
%F A306262 From _Alois P. Heinz_, Feb 01 2019: (Start)
%F A306262 G.f.: -(x^2+x-4)*x^3/((x+1)*(x-1)^4).
%F A306262 a(n) = (2*n^3+6*n^2-26*n+15-3*(-1)^n)/12 for n > 0.
%F A306262 a(n) = A101986(n-1) - A026035(n) for n > 0. (End)
%F A306262 a(n) = 3*a(n-1)-2*a(n-2)-2*a(n-3)+3*a(n-4)-a(n-5). - _Wesley Ivan Hurt_, May 28 2021
%F A306262 a(n) = A110610(n+1) - A110611(n+1). - _Talmon Silver_, Sep 24 2025
%e A306262 a(4) = 11 = 23 - 12. 1342 and 2431 have sums 23, 3214 and 4123 have sums 12.
%p A306262 a:= n-> `if`(n=0, 0, (<<0|1|0|0|0>, <0|0|1|0|0>, <0|0|0|1|0>,
%p A306262     <0|0|0|0|1>, <-1|3|-2|-2|3>>^n. <<1, 0, 0, 4, 11>>)[1, 1]):
%p A306262 seq(a(n), n=0..50);  # _Alois P. Heinz_, Feb 02 2019
%t A306262 a[n_] := Module[
%t A306262   {min, max, perm, g, mperm},
%t A306262   perm = Permutations[Range[n]];
%t A306262   g[x_] := Sum[x[[i]] x[[i + 1]], {i, 1, Length[x] - 1}];
%t A306262   mperm = Map[g, perm];
%t A306262   min = Min[mperm];
%t A306262   max = Max[mperm];
%t A306262   Return[max - min]]
%t A306262 LinearRecurrence[{3,-2,-2,3,-1},{0,0,0,4,11,24},60] (* _Harvey P. Dale_, Aug 05 2020 *)
%o A306262 (PARI) concat([0,0,0], Vec(x^3*(4 - x - x^2) / ((1 - x)^4*(1 + x)) + O(x^40))) \\ _Colin Barker_, Feb 05 2019
%Y A306262 Cf. A026035, A101986.
%K A306262 nonn
%O A306262 0,4
%A A306262 _Louis Rogliano_, Feb 01 2019
%E A306262 More terms from _Alois P. Heinz_, Feb 01 2019