OFFSET
0,3
REFERENCES
Raphael Schumacher, Explicit formulas for sums involving the squares of the first n Tribonacci numbers, Fib. Q., 58:3 (2020), 194-202.
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (5,-2,-2,-35,3,0,48,-11,7,-14,2,-1,1).
FORMULA
From Colin Barker, Sep 13 2020: (Start)
G.f.: x^2*(1 + x)*(2 - 7*x + 7*x^2 + 3*x^3 + 9*x^4 + 7*x^5 + x^6 + x^7 + x^8) / ((1 - x)*(1 + x + x^2 - x^3)^2*(1 - 3*x - x^2 - x^3)^2).
a(n) = 5*a(n-1) - 2*a(n-2) - 2*a(n-3) - 35*a(n-4) + 3*a(n-5) + 48*a(n-7) - 11*a(n-8) + 7*a(n-9) - 14*a(n-10) + 2*a(n-11) - a(n-12) + a(n-13) for n>12.
(End)
a(n) = Sum_{j=0..n} j*A085697(j). - G. C. Greubel, Nov 20 2021
MATHEMATICA
T[n_]:= T[n]= If[n<2, 0, If[n==2, 1, T[n-1] +T[n-2] +T[n-3]]]; (* A000073 *)
a[n_]:= a[n]= Sum[j*T[j]^2, {j, 0, n}];
Table[a[n], {n, 0, 30}] (* G. C. Greubel, Nov 20 2021 *)
PROG
(PARI) concat([0, 0], Vec(x^2*(1+x)*(2 -7*x +7*x^2 +3*x^3 +9*x^4 +7*x^5 +x^6 + x^7 +x^8)/((1-x)*(1 +x +x^2 -x^3)^2*(1 -3*x -x^2 -x^3)^2) + O(x^30))) \\ Colin Barker, Sep 19 2020
(Magma) R<x>:=PowerSeriesRing(Integers(), 30); [0, 0] cat Coefficients(R!( x^2*(1-x^2)*(2-7*x+7*x^2+3*x^3+9*x^4+7*x^5+x^6+x^7+x^8)/((1-x)*(1+x+x^2-x^3)*(1-3*x-x^2-x^3))^2 )); // G. C. Greubel, Nov 20 2021
(Sage)
@CachedFunction
def T(n): # A000073
if (n<2): return 0
elif (n==2): return 1
else: return T(n-1) +T(n-2) +T(n-3)
def A337283(n): return sum( j*T(j)^2 for j in (0..n) )
[A337283(n) for n in (0..40)] # G. C. Greubel, Nov 20 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Sep 12 2020
STATUS
approved