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.
%I A121907 #43 Sep 08 2022 08:45:27 %S A121907 1,3,9,24,66,180,492,1344,3672,10032,27408,74880,204576,558912, %T A121907 1526976,4171776,11397504,31138560,85072128,232421376,634987008, %U A121907 1734816768,4739607552,12948848640,35376912384,96651522048,264056868864,721416781824,1970947301376 %N A121907 Expansion of g.f.: (1 + x + x^2)/(1 - 2*x - 2*x^2). %C A121907 a(n-1) is the number of compositions of n into floor((3*j-1)/2) kinds of j's for all j >= 1. The sequence of such compositions is 1,1,3,9,24,... (i.e., this sequence prepended by 1) and has g.f. 1/(1-Sum_{j>=1} floor((3*j-1)/2)*x^j). - _Joerg Arndt_, Jul 06 2011 %C A121907 a(n) is the number of length n words on 3 letters (ternary words) such that the length of any run of identical letters is <= 2. Cf. A181137 for a generalization. - _Geoffrey Critzer_, Sep 16 2013 %D A121907 A. Burstein and T. Mansour, Words restricted by 3-letter generalized multipermutation patterns, Annals. Combin., 7 (2003), 1-14. %H A121907 G. C. Greubel, <a href="/A121907/b121907.txt">Table of n, a(n) for n = 0..1000</a> %H A121907 A. Burstein and T. Mansour, <a href="https://arxiv.org/abs/math/0112281">Words restricted by 3-letter generalized multipermutation patterns</a>, arXiv:math/0112281 [math.CO], 2001. %H A121907 Martin Burtscher, Igor Szczyrba, Rafał Szczyrba, <a href="https://www.emis.de/journals/JIS/VOL18/Szczyrba/sz3.html">Analytic Representations of the n-anacci Constants and Generalizations Thereof</a>, Journal of Integer Sequences, Vol. 18 (2015), Article 15.4.5. %H A121907 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (2,2). %F A121907 a(0)=1, a(1)=3, a(2)=9; a(n) = 2*a(n-1) + 2*a(n-2) for n>=3. - _Philippe Deléham_, Sep 19 2009 %F A121907 G.f.: (1/x)*(-1 + 1/(1-Sum_{j>=1} floor((3*j-1)/2)*x^j)). - _Joerg Arndt_, Jul 06 2011 %F A121907 E.g.f.: (1/2)*exp(x)*(3*cosh(sqrt(3)*x) + sqrt(3)*sinh(sqrt(3)*x)) - 1/2. - _Stefano Spezia_, Oct 08 2019 %p A121907 seq(coeff(series((1+x+x^2)/(1-2*x-2*x^2), x, n+1), x, n), n = 0..30); # _G. C. Greubel_, Oct 07 2019 %t A121907 CoefficientList[Series[(1+x+x^2)/(1-2x-2x^2),{x,0,30}],x] (* or *) LinearRecurrence[{2,2},{1,3,9},30] (* _Harvey P. Dale_, Dec 03 2011 *) %o A121907 (PARI) my(x='x+O('x^30)); Vec((1+x+x^2)/(1-2*x-2*x^2)) \\ _G. C. Greubel_, Oct 07 2019 %o A121907 (Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1+x+x^2)/(1-2*x-2*x^2) )); // _G. C. Greubel_, Oct 07 2019 %o A121907 (Sage) %o A121907 def A121907_list(prec): %o A121907 P.<x> = PowerSeriesRing(ZZ, prec) %o A121907 return P((1+x+x^2)/(1-2*x-2*x^2)).list() %o A121907 A121907_list(30) # _G. C. Greubel_, Oct 07 2019 %o A121907 (GAP) a:=[3,9];; for n in [3..30] do a[n]:=2*(a[n-1]+a[n-2]); od; Concatenation([1], a); # _G. C. Greubel_, Oct 07 2019 %Y A121907 Column 3 in A265584. %K A121907 nonn,easy %O A121907 0,2 %A A121907 _N. J. A. Sloane_, Nov 20 2006