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.
%I A275359 #40 Oct 01 2016 07:07:55 %S A275359 0,0,21,292,1566,5664,16375,40716,90552,184576,350649,628500,1072786, %T A275359 1756512,2774811,4249084,6331500,9209856,13112797,18315396,25145094, %U A275359 33988000,45295551,59591532,77479456,99650304,126890625,160090996,200254842,248507616 %N A275359 Maximum incarceration of numbers in an n X n X n number cubes with full incarceration volumes. %C A275359 The incarceration value for each cell is the highest value on the path of least resistance off the cube minus the value of the cell. Negative values are set to zero. %C A275359 This extends the idea of the 2D water retention on mathematical surfaces to the 3D cube. %C A275359 A number cube contains the numbers 1 to n^3 without duplicates. %C A275359 This incarceration sequence requires the smallest numbers to be placed in all possible internal cells or (n-2)^3 cells. This is not the maximum possible retention for a number cube (see link below) %C A275359 Each internal cell has 6 neighbors and thus 6 initial possible pathways of escape. %C A275359 A lake is a body of water that has dimensions of (n-2)x(n-2)x(n-2). All other retaining areas are called ponds. More than one lake is possible in the same cube. %H A275359 Colin Barker, <a href="/A275359/b275359.txt">Table of n, a(n) for n = 0..1000</a> %H A275359 Craig Knecht, <a href="/A275359/a275359_2.png">7x7x7 number cube with one pond</a> %H A275359 Craig Knecht, <a href="/A275359/a275359.pdf">Examples of lakes in higher order cubes</a> %H A275359 Craig Knecht, <a href="/A275359/a275359.png">Maximum incarceration order 4 number cube</a> %H A275359 Walter Trump, <a href="/A275359/a275359.gif">Three lakes in a 6x6x6 cube</a> %H A275359 Wikipedia, <a href="http://en.wikipedia.org/wiki/Water_retention_on_mathematical_surfaces">Water retention on mathematical surfaces</a> %H A275359 <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (7,-21,35,-35,21,-7,1). %F A275359 a(n) = (n^3 - 3*n^2 + 27*n - 8) / 2 * (n-1)^3 for n>0. %F A275359 From _Colin Barker_, Jul 31 2016: (Start) %F A275359 a(n) = (n^6-6*n^5+39*n^4-99*n^3+108*n^2-51*n+8)/2 for n>0. %F A275359 a(n) = 7*a(n-1)-21*a(n-2)+35*a(n-3)-35*a(n-4)+21*a(n-5)-7*a(n-6)+a(n-7) for n>7. %F A275359 G.f.: x^2*(21+145*x-37*x^2+99*x^3+128*x^4+4*x^5) / (1-x)^7. %F A275359 (End) %e A275359 An order 3 number cube contains the numbers 1 to 27. The smallest value 1 is placed in the single central cell. The largest possible 6 numbers 27,26,25,24,23,22 occupy the central cell in each face of the cube. Thus the path of least resistance off the cube is through cell 22. The total incarceration is then 22-1 = 21 units of incarceration. %e A275359 2 3 4 10 27 11 14 15 16 %e A275359 5 23 6 24 1 25 17 22 18 %e A275359 7 8 9 12 26 13 19 20 21 %o A275359 (PARI) concat([0,0], Vec(x^2*(21+145*x-37*x^2+99*x^3+128*x^4+4*x^5)/(1-x)^7 + O(x^50))) \\ _Colin Barker_, Aug 01 2016 %o A275359 (PARI) a(n) = (n^3 - 3*n^2 + 27*n - 8)/2 * (n-1)^3 \\ _Charles R Greathouse IV_, Aug 05 2016 %Y A275359 A261347 (maximum retention of a number square of order n), A260302 (maximum retention of a number octagon of order n). %K A275359 nonn,easy %O A275359 0,3 %A A275359 _Craig Knecht_, Jul 24 2016 %E A275359 Edited and a(20)-a(29) added by _Colin Barker_, Aug 01 2016