OFFSET
1,3
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..1000
Eric Weisstein's World of Mathematics, Bipartite Graph.
Eric Weisstein's World of Mathematics, Detour Index
Index entries for linear recurrences with constant coefficients, signature (1,3,-3,-3,3,1,-1).
FORMULA
a(2*n-1) = 4*(n-1)^3, a(2*n) = n*(4*n^2 - 5*n + 2).
From Colin Barker, Dec 21 2017: (Start)
G.f.: x^2*(1 + 3*x + 9*x^2 + 7*x^3 + 4*x^4) / ((1 - x)^4*(1 + x)^3).
a(n) = a(n-1) + 3*a(n-2) - 3*a(n-3) - 3*a(n-4) + 3*a(n-5) + a(n-6) - a(n-7) for n>7.
(End)
MATHEMATICA
Rest@ CoefficientList[Series[x^2*(1 + 3 x + 9 x^2 + 7 x^3 + 4 x^4)/((1 - x)^4*(1 + x)^3), {x, 0, 44}], x] (* Michael De Vlieger, Dec 24 2017 *)
PROG
(PARI)
MaxBipartiteDetourIndex(a, b) = { a*(a-1)*min(a-1, b) + b*(b-1)*min(b-1, a) + a*b*(2*min(a, b)-1) }
a(n) = MaxBipartiteDetourIndex(floor(n/2), ceil(n/2));
(PARI) concat(0, Vec(x^2*(1 + 3*x + 9*x^2 + 7*x^3 + 4*x^4) / ((1 - x)^4*(1 + x)^3) + O(x^40))) \\ Colin Barker, Dec 21 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Andrew Howroyd, Dec 21 2017
STATUS
approved