%I #34 Feb 17 2022 00:03:29
%S 1,2,6,8,12,15,20,24,30,35,42,48,56,63,72,80,90,99,110,120,132,143,
%T 156,168,182,195,210,224,240,255,272,288,306,323,342,360,380,399,420,
%U 440,462,483,506,528,552,575,600,624,650,675,702,728,756,783,812,840,870
%N Largest integer m such that every permutation (p_1, ..., p_n) of (1, ..., n) satisfies p_i * p_{i+1} >= m for some i, 1 <= i <= n, where p_{n+1} = p_1.
%C Conjecture: a(n) = (n+1)(n+3)/4 for odd n, a(n) = (n)(n+4)/4 for even n. - _Jud McCranie_, Oct 25 2001
%H Vincenzo Librandi, <a href="/A064796/b064796.txt">Table of n, a(n) for n = 1..10000</a>
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2,0,-2,1).
%F For odd n > 2, a(n) = (n+1)(n+3)/4. For even n > 2, a(n) = n(n+4)/4. - _David Wasserman_, Aug 19 2002
%F a(n) = 2*a(n-1)-2*a(n-3)+a(n-4) for n>6. G.f.: -x*(x^5-x^4-2*x^3+2*x^2+1) / ((x-1)^3*(x+1)). - _Colin Barker_, Aug 28 2013
%F For n>2: a(n)=1/8*(3-3*(-1)^n+8*n+2*n^2). - _Tom Edgar_, Aug 28 2013
%e n=5: we must arrange the numbers 1..5 in a circle so that the max of the products of pairs of adjacent terms is minimized. The answer is 15243, with max product = 12, so a(5) = 12.
%t Join[{1,2},LinearRecurrence[{2,0,-2,1},{6,8,12,15},60]] (* _Harvey P. Dale_, Sep 17 2013 *)
%o (PARI) a(n)=if(n<3, n, if(n%2, (n+1)*(n+3), (n+4)*n)/4) \\ _Charles R Greathouse IV_, Feb 19 2017
%o (Magma) [1,2] cat [1/8*(3-3*(-1)^n+8*n+2*n^2): n in [3..60]]; // _Vincenzo Librandi_, Feb 24 2017
%Y Cf. A064764, A035106, A064797.
%K nonn,nice,easy
%O 1,2
%A _N. J. A. Sloane_, Oct 21 2001
%E More terms from _Naohiro Nomoto_ and _Vladeta Jovovic_, Oct 22 2001
%E More terms from _David Wasserman_, Aug 19 2002