OFFSET
0,3
COMMENTS
LINKS
Matthew House, Table of n, a(n) for n = 0..3272
Index entries for linear recurrences with constant coefficients, signature (8,-24,32,-16).
FORMULA
a(n) = 2^(n - 2)*n*(n + 1)*(2*n + 1)/3.
G.f.: x*(1 + 2*x)/(1 - 2*x)^4.
a(n) = 8*a(n-1) - 24*a(n-2) + 32*a(n-3) - 16*a(n-4). - Matthew House, Feb 13 2017
a(n) = (1/2) * Sum_{k=0..n} Sum_{i=0..n} i^2 * C(n,k). - Wesley Ivan Hurt, Sep 21 2017
EXAMPLE
a(3)=56 since the subsets of (1,2,3) are ( ) (1) (1,2) (1,3) (1,2,3) (2) (2,3) (3) and the sum of the squares of the elements in these subsets is 56.
PROG
(PARI) a(n) = (2^(n-2))*n*(n+1)*(2*n+1)/3 \\ Michel Marcus, Jul 12 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alan Sutcliffe (alansut(AT)ntlworld.com), Aug 08 2003
STATUS
approved