%I #24 Sep 08 2022 08:45:35
%S 1,1,1,9,25,81,289,961,3249,11025,37249,126025,426409,1442401,4879681,
%T 16507969,55845729,188925025,639128961,2162157001,7314525625,
%U 24744863025,83711270241,283193201281,958035736849,3241011678961
%N Squares of tribonacci numbers A000213.
%C Partial sums are in A107240.
%C a(n) is also the number of total dominating sets in the (n-1)-ladder graph. - _Eric W. Weisstein_, Apr 10 2018
%H Vincenzo Librandi, <a href="/A141583/b141583.txt">Table of n, a(n) for n = 0..1000</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/LadderGraph.html">Ladder Graph</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/TotalDominatingSet.html">Total Dominating Set</a>
%H <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (2,3,6,-1,0,-1).
%F a(n) = (A000213(n))^2.
%F O.g.f.: (1+x)^2*(1-3*x+x^2-x^3)/((1+x+x^2-x^3)*(1-3*x-x^2-x^3)).
%F a(n) = 2*a(n-1) + 3*a(n-2) + 6*a(n-3) - a(n-4) - a(n-6).
%t 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 *)
%t Table[RootSum[-1 - # - #^2 + #^3 &, 2 #^n - 4 #^(n + 1) + 3 #^(n + 2) &]^2/121, {n, 0, 20}] (* _Eric W. Weisstein_, Apr 10 2018 *)
%t LinearRecurrence[{2,3,6,-1,0,-1}, {1,1,9,25,81,289}, {0, 20}] (* _Eric W. Weisstein_, Apr 10 2018 *)
%t LinearRecurrence[{1,1,1},{1,1,1},40]^2 (* _Harvey P. Dale_, Aug 01 2021 *)
%o (Magma) 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
%o (Sage)
%o @CachedFunction
%o def T(n): # A000213
%o if (n<3): return 1
%o else: return T(n-1) +T(n-2) +T(n-3)
%o def A141583(n): return T(n)^2
%o [A141583(n) for n in (0..40)] # _G. C. Greubel_, Nov 22 2021
%Y Cf. A000213, A085697, A107240.
%K easy,nonn
%O 0,4
%A _R. J. Mathar_, Aug 19 2008