cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Views

Author

R. J. Mathar, Aug 19 2008

Keywords

Comments

Partial sums are in A107240.
a(n) is also the number of total dominating sets in the (n-1)-ladder graph. - Eric W. Weisstein, Apr 10 2018

Crossrefs

Programs

  • 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
    
  • Mathematica
    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 *)
  • Sage
    @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

Formula

a(n) = (A000213(n))^2.
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)).
a(n) = 2*a(n-1) + 3*a(n-2) + 6*a(n-3) - a(n-4) - a(n-6).