OFFSET
0,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (7, -21, 35, -35, 21, -7, 1).
FORMULA
G.f.: -6*x*(7*x^4+42*x^3+56*x^2+14*x+1)/(x-1)^7.
a(n) = (n+1)*(n^2+n+1)*a(n-1)/((n-1)*(n^2-3*n+3)) for n>1.
a(1) = 6, else a(n) = (n^7-n)/(n-1).
a(n) = 6*A059721(n) = n*(n+1)*(1+n+n^2)*(1-n+n^2). - R. J. Mathar, Aug 21 2013
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>6, a(0)=0, a(1)=6, a(2)=126, a(3)=1092, a(4)=5460, a(5)=19530, a(6)=55986. - Yosu Yurramendi, Sep 03 2013
MAPLE
a:= n-> (1+(1+(1+(1+(1+n)*n)*n)*n)*n)*n:
seq(a(n), n=0..30);
# second Maple program:
a:= proc(n) option remember; `if`(n<2, 6*n,
(n+1)*(n^2+n+1)*a(n-1)/((n-1)*(n^2-3*n+3)))
end:
seq(a(n), n=0..30);
# third Maple program:
a:= n-> `if`(n=1, 6, (n^7-n)/(n-1)):
seq(a(n), n=0..30);
PROG
(R)
a <- c(0, 6, 126, 1092, 5460, 19530, 55986)
for(n in (length(a)+1):30) 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]
a
[Yosu Yurramendi, Sep 03 2013]
(PARI) a(n) = n^6 + n^5 + n^4 + n^3 + n^2 + n; \\ Joerg Arndt, Sep 03 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alois P. Heinz, Aug 19 2013
STATUS
approved