login
A087955
a(n) is the square of the n-th partial sum minus the n-th partial sum of the squares, divided by a(n-1), for all n>=1, starting with a(0)=1, a(1)=2.
3
1, 2, 2, 8, 12, 34, 62, 152, 304, 698, 1458, 3248, 6924, 15210, 32734, 71440, 154432, 336018, 727874, 1581496, 3429100, 7445714, 16151518, 35059560, 76068400, 165095562, 358241202, 777459488, 1687087532, 3661224794, 7945027902
OFFSET
0,2
FORMULA
a(n) = a(n-1) + 3a(n-2) - a(n-3) for n>3; G.f.: (1+x-3x^2+x^3)/(1-x-3x^2+x^3).
EXAMPLE
a(4)=12 since ((1+2+2+8)^2 - (1^2+2^2+2^2+8^2))/8 = (13^2-73)/8 = 12.
MATHEMATICA
LinearRecurrence[{1, 3, -1}, {1, 2, 2, 8}, 40] (* Harvey P. Dale, Mar 24 2017 *)
CROSSREFS
Sequence in context: A274409 A302118 A014236 * A026537 A089248 A006663
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Sep 16 2003
STATUS
approved