A107239
Sum of squares of tribonacci numbers (A000073).
Original entry on oeis.org
0, 0, 1, 2, 6, 22, 71, 240, 816, 2752, 9313, 31514, 106590, 360606, 1219935, 4126960, 13961456, 47231280, 159782161, 540539330, 1828631430, 6186215574, 20927817799, 70798300288, 239508933824, 810252920400, 2741065994769, 9272959837818, 31370198430718
Offset: 0
a(7) = 71 = 0^2 + 0^2 + 1^2 + 1^2 + 2^2 + 4^2 + 7^2
- R. Schumacher, Explicit formulas for sums involving the squares of the first n Tribonacci numbers, Fib. Q., 58:3 (2020), 194-202.
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- M. Feinberg, Fibonacci-Tribonacci, Fib. Quart. 1(3) (1963), 71-74.
- Z. Jakubczyk, Advanced Problems and Solutions, Fib. Quart. 51 (3) (2013) 185, H-715.
- Eric Weisstein's World of Mathematics, Tribonacci Number
- Index entries for linear recurrences with constant coefficients, signature (3,1,3,-7,1,-1,1).
-
R:=PowerSeriesRing(Integers(), 40); [0,0] cat Coefficients(R!( x^2*(1-x-x^2-x^3)/((1+x+x^2-x^3)*(1-3*x-x^2-x^3)*(1-x)) )); // G. C. Greubel, Nov 20 2021
-
b:= proc(n) option remember; `if`(n<3, [n*(n-1)/2$2],
(t-> [t, t^2+b(n-1)[2]])(add(b(n-j)[1], j=1..3)))
end:
a:= n-> b(n)[2]:
seq(a(n), n=0..30); # Alois P. Heinz, Nov 22 2021
-
Accumulate[LinearRecurrence[{1,1,1},{0,0,1},30]^2] (* Harvey P. Dale, Sep 11 2011 *)
LinearRecurrence[{3,1,3,-7,1,-1,1}, {0,0,1,2,6,22,71}, 30] (* Ray Chandler, Aug 02 2015 *)
-
@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 A107231(n): return sum(T(j)^2 for j in (0..n))
[A107239(n) for n in (0..40)] # G. C. Greubel, Nov 20 2021
A107241
Sum of squares of first n tetranacci numbers (A000288).
Original entry on oeis.org
1, 2, 3, 4, 20, 69, 238, 863, 3264, 12100, 44861, 166662, 619591, 2301800, 8551800, 31774561, 118060082, 438649107, 1629796276, 6055504952, 22499207241, 83595676570, 310599326171, 1154030334396, 4287794153932, 15931278338957
Offset: 1
a(1) = 1^2 = 1.
a(2) = 1^2 + 1^2 = 1.
a(3) = 1^2 + 1^2 + 1^2 = 3, prime.
a(4) = 1^2 + 1^2 + 1^2 + 1^2 = 4 = 2^2, semiprime.
a(5) = 1^2 + 1^2 + 1^2 + 1^2 + 4^2 = 20.
a(6) = 1^2 + 1^2 + 1^2 + 1^2 + 4^2 + 7^2 = 69 = 3 * 23, semiprime.
a(8) = 1^2 + 1^2 + 1^2 + 1^2 + 4^2 + 7^2 + 13^2 + 25^2 = 863, prime.
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
- Eric Weisstein's World of Mathematics, Fibonacci n-Step Number.
- Index entries for linear recurrences with constant coefficients, signature (3,2,2,6,-16,-2,6,-2,2,1,-1).
Cf.
A000288,
A107239,
A107240,
A107241,
A107242,
A107243,
A107244,
A107245,
A107246,
A107247,
A107248.
-
T:= proc(n) option remember;
if n=0 then 0
elif n<5 then 1
else add(T(n-j), j=1..4)
fi; end:
seq( add(T(k)^2, k=1..n), n=1..30); # G. C. Greubel, Dec 18 2019
-
Accumulate[LinearRecurrence[{1,1,1,1},{1,1,1,1},30]^2] (* Harvey P. Dale, Feb 14 2012 *)
LinearRecurrence[{3,2,2,6,-16,-2,6,-2,2,1,-1}, {1,2,3,4,20,69,238,863,3264, 12100,44861}, 30] (* Ray Chandler, Aug 02 2015 *)
T[n_]:= T[n]= If[n == 0, 0, If[n < 5, 1, Sum[T[n-j], {j,4}]]]; a[n_]:= Sum[T[j]^2, {j,n}]; Table[a[n], {n, 30}] (* G. C. Greubel, Dec 18 2019 *)
-
@CachedFunction
def T(n):
if (n==0): return 0
elif (n<5): return 1
else: return sum(T(n-j) for j in (1..4))
def a(n): return sum(T(j)^2 for j in (1..n))
[a(n) for n in (1..30)] # G. C. Greubel, Dec 18 2019
A141583
Squares of tribonacci numbers A000213.
Original entry on oeis.org
1, 1, 1, 9, 25, 81, 289, 961, 3249, 11025, 37249, 126025, 426409, 1442401, 4879681, 16507969, 55845729, 188925025, 639128961, 2162157001, 7314525625, 24744863025, 83711270241, 283193201281, 958035736849, 3241011678961
Offset: 0
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Eric Weisstein's World of Mathematics, Ladder Graph
- Eric Weisstein's World of Mathematics, Total Dominating Set
- Index entries for linear recurrences with constant coefficients, signature (2,3,6,-1,0,-1).
-
I:=[1,1,1,9,25,81]; [n le 6 select I[n] else 2*Self(n-1) + 3*Self(n-2) + 6*Self(n-3) - Self(n-4) - Self(n-6): n in [1..30]]; // Vincenzo Librandi, Dec 13 2012
-
CoefficientList[Series[(1+x)^2*(1-3*x+x^2-x^3)/((1+x+x^2-x^3)*(1-3*x-x^2-x^3)), {x, 0, 40}], x] (* Vincenzo Librandi, Dec 13 2012 *)
Table[RootSum[-1 - # - #^2 + #^3 &, 2 #^n - 4 #^(n + 1) + 3 #^(n + 2) &]^2/121, {n, 0, 20}] (* Eric W. Weisstein, Apr 10 2018 *)
LinearRecurrence[{2,3,6,-1,0,-1}, {1,1,9,25,81,289}, {0, 20}] (* Eric W. Weisstein, Apr 10 2018 *)
LinearRecurrence[{1,1,1},{1,1,1},40]^2 (* Harvey P. Dale, Aug 01 2021 *)
-
@CachedFunction
def T(n): # A000213
if (n<3): return 1
else: return T(n-1) +T(n-2) +T(n-3)
def A141583(n): return T(n)^2
[A141583(n) for n in (0..40)] # G. C. Greubel, Nov 22 2021
Showing 1-3 of 3 results.
Comments