OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (5, -10, 10, -5, 1).
FORMULA
a(n) = (1/6)*(2*n^4 - 2*n^2 + 6*n).
G.f.: x*(1 + x + 7*x^2 - x^3)/(1-x)^5. - Colin Barker, Apr 16 2012
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5); a(1)=1, a(2)=6, a(3)=27, a(4)=84, a(5)=205. - Harvey P. Dale, May 11 2016
E.g.f.: (3*x + 6*x^2 + 6*x^3 + x^4)*exp(x)/3. - G. C. Greubel, Nov 08 2018
EXAMPLE
There are no 1- or 2-gonal anti-diamonds, so 1 and (2n+2) are the first and second terms since all the sequences begin as such.
MATHEMATICA
Table[(2n^4-2n^2+6n)/6, {n, 40}] (* or *) LinearRecurrence[{5, -10, 10, -5, 1}, {1, 6, 27, 84, 205}, 40] (* Harvey P. Dale, May 11 2016 *)
PROG
(Magma) [(1/6)*(2*n^4-2*n^2+6*n): n in [1..40]]; // Vincenzo Librandi, Aug 18 2011
(PARI) vector(40, n, (n^4 -n^2 +3*n)/3) \\ G. C. Greubel, Nov 08 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
James A. Record (james.record(AT)gmail.com), Nov 07 2004
STATUS
approved