OFFSET
1,3
COMMENTS
LINKS
G. C. Greubel and Craig Knecht, Table of n, a(n) for n = 1..1000 (Terms 1 through 32 were computed by Craig Knecht; terms 33 through 1000 by G. C. Greubel, Nov 13 2015; term 451 = 1002105368551 corrected by Georg Fischer, May 24 2019)
Craig Knecht, Octagon volume calculation.
Craig Knecht, Volume retention of a number square.
Wikipedia, Water retention on mathematical surfaces
Index entries for linear recurrences with constant coefficients, signature (5,-10,10,-5,1).
FORMULA
a(n) = (1/2)*(7*n^2 - 18*n + 12) (7*n^2 - 18*n + 13) for n > 2.
From Colin Barker, Nov 11 2015: (Start)
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5) for n>7.
G.f.: -x^3*(10*x^4-49*x^3+173*x^2+223*x+231) / (x-1)^5. (End)
EXAMPLE
(22 23 24)
(37 1 2 3 25)
(36 4 5 6 7 8 26)
(35 9 10 11 12 13 27)
(34 14 15 16 17 18 28)
(33 19 20 21 29)
(32 31 30)
The largest values (22 - 37) form the dam with the value 22 being the spillway.
MATHEMATICA
Table[-KroneckerDelta[n, 1] - 10*KroneckerDelta[n, 2] + (1/2)*((7*n^2-18*n+12)^2+(7*n^2-18*n+12)), {n, 1, 30}] (* G. C. Greubel, Nov 13 2015 *)
PROG
(PARI) concat(vector(2), Vec(-x^3*(10*x^4-49*x^3+173*x^2+223*x+231)/(x-1)^5 + O(x^100))) \\ Colin Barker, Nov 11 2015
(Magma) [0, 0] cat [(1/2)*(7*n^2-18*n+12)*(7*n^2-18*n+13): n in [3..60]]; // Vincenzo Librandi, Nov 20 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Craig Knecht, Nov 10 2015
STATUS
approved