OFFSET
1,2
COMMENTS
A269747 is a very similar sequence with a much simpler definition (but which does not appear to have a simple formula). The difference between these two sequences is unclear. - N. J. A. Sloane, Mar 30 2016
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (4,-6,5,-5,6,-4,1).
FORMULA
a(n) = (1/18)*(1 - (-1)^(n mod 3) + 3*n + 7*n^2 + 5*n^3 + n^4).
G.f.: x*(1+x+2*x^2)/((1-x)^5*(1+x+x^2)). - Bruno Berselli, Sep 11 2012
EXAMPLE
For n=9 the number of the tetrahedra of any orientation (those with the same orientation as the original one plus those with reverse orientation) is the total of the number of each size (counted from the smallest size upwards): t(9)+t(7)=165+84=249, t(8)+t(4)=120+20=140, t(7)+t(1)=84+1=85, t(6)=56, t(5)=35, t(4)=20, t(3)=10, t(2)=4 and t(1)=1, the total being a(9)=600, where t(n) denotes the tetrahedral number A000292(n).
MATHEMATICA
Table[(1/18) (1 - (-1)^Mod[n, 3] + 3 n + 7 n^2 + 5 n^3 + n^4), {n, 50}]
CoefficientList[Series[(1 + x + 2 x^2)/((1 - x)^5 (1 + x + x^2)), {x, 0, 50}], x] (* Vincenzo Librandi, Sep 12 2012 *)
PROG
(Magma) I:=[1, 5, 16, 39, 80, 147, 249]; [n le 7 select I[n] else 4*Self(n-1)-6*Self(n-2)+5*Self(n-3)-5*Self(n-4)+6*Self(n-5)-4*Self(n-6)+Self(n-7): n in [1..50]]; // Vincenzo Librandi, Sep 12 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
V.J. Pohjola, Sep 03 2012
STATUS
approved