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.

A100477 a(n) = 3*a(n-1) + 2*a(n-2) + a(n-3) if n>=3, otherwise a(n) = n.

This page as a plain text file.
%I A100477 #29 Aug 25 2023 12:18:45
%S A100477 0,1,2,8,29,105,381,1382,5013,18184,65960,239261,867887,3148143,
%T A100477 11419464,41422565,150254766,545028892,1977018773,7171368869,
%U A100477 26013173045,94359275646,342275541897,1241558350028,4503585409524
%N A100477 a(n) = 3*a(n-1) + 2*a(n-2) + a(n-3) if n>=3, otherwise a(n) = n.
%C A100477 Weighted sum of the three previous terms.
%C A100477 a(n+1) is the number of ways to tile a strip of length n with 3 colors of squares, 2 colors of dominos, and 1 color of tromino, with the restriction that if the first tile is a square, then it can only use two colors. - _Greg Dresden_ and Bora Bursali, Aug 17 2023
%H A100477 G. C. Greubel, <a href="/A100477/b100477.txt">Table of n, a(n) for n = 0..1000</a>
%H A100477 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,2,1).
%F A100477 From _R. J. Mathar_, Aug 22 2008: (Start)
%F A100477 O.g.f.: x*(1-x)/(1-3*x-2*x^2-x^3).
%F A100477 a(n) = A108153(n) - A108153(n-1). (End)
%F A100477 a(0)=0, a(1)=1, a(2)=2, a(n)=3*a(n-1)+2*a(n-2)+a(n-3). - _Harvey P. Dale_, Jun 19 2015
%t A100477 RecurrenceTable[{a[n]== 3a[n-1] +2a[n-2] +a[n-3], a[0]==0, a[1]==1, a[2]==2}, a, {n,0,26}] (* or *)
%t A100477 CoefficientList[ Series[(x^2-x)/(x^3+2x^2+3x-1), {x,0,26}], x] (* _Robert G. Wilson v_, May 19 2015 *)
%t A100477 LinearRecurrence[{3,2,1},{0,1,2},40] (* _Harvey P. Dale_, Jun 19 2015 *)
%o A100477 (Perl) #!/usr/local/bin/perl -w $d=0; $c=1; $b=2; print "$d,$c,$b,"; $a=0; for (;;){ $a=3*$b+2*$c+$d; $d=$c; $c=$b; $b=$a; print "$a,"; last if ($a >2**61); } __END__
%o A100477 (Magma) [n le 3 select n-1 else 3*Self(n-1)+2*Self(n-2)+Self(n-3): n in [1..30]]; // _Vincenzo Librandi_, May 20 2015
%o A100477 (SageMath)
%o A100477 @CachedFunction
%o A100477 def a(n): # a = A100477
%o A100477     if (n<3): return n
%o A100477     else: return 3*a(n-1)+2*a(n-2)+a(n-3)
%o A100477 [a(n) for n in range(41)] # _G. C. Greubel_, Apr 06 2023
%Y A100477 Cf. A108153.
%K A100477 nonn,easy
%O A100477 0,3
%A A100477 gamo (gamo(AT)telecable.es), Nov 22 2004