OFFSET
0,2
COMMENTS
Subsequence of A034836, which gives the number of cuboids for volume n.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000
Geoffrey B. Campbell, Vector Partition Identities for 2D, 3D and nD Lattices, arXiv:2302.01091 [math.CO], 2023.
Index entries for linear recurrences with constant coefficients, signature (2,1,-3,-1,1,3,-1,-2,1).
FORMULA
If n is a multiple of 3, a(n) = ((n+2)^2*(n+1)^2 + 12*(floor(n/2)+1)^2+8)/24, otherwise a(n) = ((n+2)^2*(n+1)^2 + 12*(floor(n/2)+1)^2)/24. - Frederic Solbes, Mar 18 2014
G.f.: -(x^6+3*x^4+4*x^3+3*x^2+1)/((x^2+x+1)*(x+1)^2*(x-1)^5). - Colin Barker, Mar 27 2014
From Daniel Mondot, Sep 20 2016: (Start)
a(n) = a(n-1) + 2*a(n-2) - a(n-3) - 2*a(n-4) - a(n-5) + 2*a(n-6) + a(n-7) - a(n-8) + 12, n>=8.
a(n) = 4*a(n-6) - 6*a(n-12) + 4*a(n-18) - a(n-24) + 1296, n>=24. (End)
MATHEMATICA
a[n_] := Switch[Mod[n, 6], 0, n+1, 1|5, 3n/4 + 7/24, 2|4, n+2/3, 3, 3n/4 + 5/8] + n^4/24 + n^3/4 + 2n^2/3; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Oct 06 2016, after Frederic Solbes' formula *)
PROG
(PARI) a(n) = if (n % 3, ((n+2)^2*(n+1)^2 + 12*(n\2+1)^2)/24, ((n+2)^2*(n+1)^2 + 12*(n\2+1)^2+8)/24); \\ Michel Marcus, Mar 18 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Anthony C Robin, Jan 17 2005
EXTENSIONS
Extended by Ray Chandler, Dec 17 2008
Edited by Ray Chandler, Dec 19 2008
a(0) = 1 prepended by Daniel Mondot, Sep 20 2016
STATUS
approved