OFFSET
1,3
REFERENCES
R. Schumacher, Explicit formulas for sums involving the squares of the first n Tribonacci numbers, Fib. Q., 58:3 (2020), 194-202. (Note that this paper uses an offset for the tribonacci numbers that is different from that used in A000073).
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
FORMULA
Schumacher (on page 194) gives two explicit formulas for a(n) in terms of tribonacci numbers.
From Colin Barker, Sep 14 2020: (Start)
G.f.: x^2*(1 - 2*x + 2*x^2 + 12*x^3 + 8*x^5 + 2*x^6 + 4*x^7 + 3*x^8 + 2*x^9) / ((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>13.
(End)
MATHEMATICA
T[n_]:= T[n]= If[n<2, 0, If[n==2, 1, T[n-1] +T[n-2] +T[n-3]]];
a[n_]:= a[n]= Sum[(j-1)*T[j]^2, {j, 0, n}];
Table[a[n], {n, 40}] (* G. C. Greubel, Nov 22 2021 *)
PROG
(Magma) R<x>:=PowerSeriesRing(Integers(), 40); [0] cat Coefficients(R!( x^2*(1-2*x+2*x^2+12*x^3+8*x^5+2*x^6+4*x^7+3*x^8+2*x^9)/((1-x)*(1-2*x-3*x^2-6*x^3+x^4+x^6)^2) )); // G. C. Greubel, Nov 22 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 A337284(n): return sum( (j-1)*T(j)^2 for j in (0..n) )
[A337284(n) for n in (1..40)] # G. C. Greubel, Nov 22 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Sep 12 2020
STATUS
approved