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 A122558 #30 Oct 28 2024 04:54:56 %S A122558 1,3,15,69,321,1491,6927,32181,149505,694563,3226767,14990757, %T A122558 69643329,323545587,1503112335,6983086101,32441681409,150715983939, %U A122558 700188979983,3252903871749,15112182426945,70207441323027,326166312572943 %N A122558 a(0)=1, a(1)=3, a(n) = 4*a(n-1) + 3*a(n-2) for n > 1. %C A122558 a(n) is the number of compositions of n when there are 3 types of 1 and 6 types of other natural numbers. - _Milan Janjic_, Aug 13 2010 %H A122558 G. C. Greubel, <a href="/A122558/b122558.txt">Table of n, a(n) for n = 0..1000</a> %H A122558 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (4,3). %F A122558 G.f.: (1-x)/(1-4*x-3*x^2). %F A122558 a(n) = Sum_{k=0..n} 3^k*A122542(n,k). %F A122558 Limit_{n->infinity} a(n+1)/a(n) = 2 + sqrt(7) = 4.645751311064.... %F A122558 a(n) = ((7+sqrt(7))/14)*(2+sqrt(7))^n + ((7-sqrt(7))/14)*(2-sqrt(7))^n. - _Richard Choulet_, Nov 20 2008 %t A122558 LinearRecurrence[{4,3},{1,3},30] (* _Harvey P. Dale_, Mar 18 2023 *) %o A122558 (PARI) Vec((1-x)/(1-4*x-3*x^2) + O(x^30)) \\ _Michel Marcus_, Feb 04 2022 %o A122558 (Magma) %o A122558 [n le 2 select 3^(n-1) else 4*Self(n-1) +3*Self(n-2): n in [1..41]]; // _G. C. Greubel_, Oct 27 2024 %o A122558 (SageMath) %o A122558 A122558= BinaryRecurrenceSequence(4,3,1,3) %o A122558 [A122558(n) for n in range(41)] # _G. C. Greubel_, Oct 27 2024 %Y A122558 Cf. A122542. %K A122558 nonn %O A122558 0,2 %A A122558 _Philippe Deléham_, Sep 20 2006, Sep 22 2006 %E A122558 Corrected by _T. D. Noe_, Nov 07 2006