OFFSET
1,2
COMMENTS
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
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1).
FORMULA
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
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
For n>2: a(n)=1/8*(3-3*(-1)^n+8*n+2*n^2). - Tom Edgar, Aug 28 2013
EXAMPLE
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.
MATHEMATICA
Join[{1, 2}, LinearRecurrence[{2, 0, -2, 1}, {6, 8, 12, 15}, 60]] (* Harvey P. Dale, Sep 17 2013 *)
PROG
(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
(Magma) [1, 2] cat [1/8*(3-3*(-1)^n+8*n+2*n^2): n in [3..60]]; // Vincenzo Librandi, Feb 24 2017
CROSSREFS
KEYWORD
nonn,nice,easy
AUTHOR
N. J. A. Sloane, Oct 21 2001
EXTENSIONS
More terms from Naohiro Nomoto and Vladeta Jovovic, Oct 22 2001
More terms from David Wasserman, Aug 19 2002
STATUS
approved