OFFSET
0,3
COMMENTS
For a guide to related sequences, see A211795.
For n>=1, a(n) is the number of cells in the n-th rhombic-dodecahedral polycube. - George Sicherman, Jan 22 2024
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4).
a(n) = n * (2*n^2 - 3*n + 2). - J. M. Bergot, Jun 22 2012
a(n) = (A005917(n) + 1) / 2 for n > 0. - Reinhard Zumkeller, Nov 13 2014
G.f.: x*(1 + 4*x + 7*x^2) / (1 - x)^4. - Colin Barker, Dec 02 2017
EXAMPLE
a(2) counts these 4-tuples: (1,1,1,1), (1,1,2,2), (1,2,1,2), (2,1,1,2), (1,2,2,1), (2,1,2,1), (2,2,1,1), (2,2,2,2).
MATHEMATICA
t = Compile[{{n, _Integer}},
Module[{s = 0}, (Do[If[Apply[Plus, Rest[Most[Sort[{w, x, y, z}]]]]/2 == (w + x + y + z)/4, s = s + 1], {w, 1, #}, {x, 1, #}, {y, 1, #}, {z, 1, #}] &[n]; s)]];
Flatten[Map[{t[#]} &, Range[0, 50]]] (* A212133 *)
(* Peter J. C. Moses, May 01 2012 *)
PROG
(PARI) a(n)=2*n^3-3*n^2+2*n; \\ Joerg Arndt, Jun 22 2012
(PARI) concat(0, Vec(x*(1 + 4*x + 7*x^2) / (1 - x)^4 + O(x^40))) \\ Colin Barker, Dec 02 2017
(Haskell)
a212133 n = if n == 0 then 0 else (a005917 n + 1) `div` 2
-- Reinhard Zumkeller, Nov 13 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, May 04 2012
EXTENSIONS
Closed form adapted to the offset by Bruno Berselli, Jun 07 2013
STATUS
approved