OFFSET
0,2
FORMULA
a(n) = a(n-1) + 3a(n-2) - a(n-3) for n>3; G.f.: (1+2x-4x^2+x^3)/(1-x-3x^2+x^3).
EXAMPLE
a(4)=14 since ((1+3+2+11)^2 - (1^2+3^2+2^2+11^2))/11 = (17^2-135)/11 = 14.
PROG
(PARI) a(0)=1; a(1)=3; 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