OFFSET
0,2
FORMULA
a(n) = a(n-1) + 3a(n-2) - a(n-3) for n>3; G.f.: (1+3x-5x^2+x^3)/(1-x-3x^2+x^3).
EXAMPLE
a(4)=16 since ((1+4+2+14)^2 - (1^2+4^2+2^2+14^2))/14 = (21^2-217)/14 = 16.
PROG
(PARI) a(0)=1; a(1)=4; for(n=2, 50, a(n)=((sum(k=0, n, a(k))^2-sum(k=0, n, a(k)^2))/a(n-1))
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Sep 16 2003
STATUS
approved