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.

A122117 a(n) = 3*a(n-1) + 4*a(n-2), with a(0)=1, a(1)=2.

This page as a plain text file.
%I A122117 #48 Apr 22 2025 10:54:30
%S A122117 1,2,10,38,154,614,2458,9830,39322,157286,629146,2516582,10066330,
%T A122117 40265318,161061274,644245094,2576980378,10307921510,41231686042,
%U A122117 164926744166,659706976666,2638827906662,10555311626650,42221246506598
%N A122117 a(n) = 3*a(n-1) + 4*a(n-2), with a(0)=1, a(1)=2.
%C A122117 Inverse binomial transform of A005053. Binomial transform of [1, 1, 7, 13, 55, ...] = A015441(n+1).
%C A122117 Convolved with [1, 2, 2, 2, ...] = powers of 4: [1, 4, 16, 64, ...]. - _Gary W. Adamson_, Jun 02 2009
%C A122117 a(n) is the number of compositions of n when there are 2 types of 1 and 6 types of other natural numbers. - _Milan Janjic_, Aug 13 2010
%H A122117 Vincenzo Librandi, <a href="/A122117/b122117.txt">Table of n, a(n) for n = 0..1000</a>
%H A122117 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (3,4).
%F A122117 a(n) = 2*A108981(n-1) for n > 0, with a(0) = 1.
%F A122117 a(2*n) = 4*a(2*n-1) + 2, a(2*n+1) = 4*a(2*n) - 2.
%F A122117 a(n) = Sum_{k=0..n} 2^(n-k)*A055380(n,k).
%F A122117 G.f.: (1-x)/(1-3*x-4*x^2).
%F A122117 Lim_{n->infinity} a(n+1)/a(n) = 4.
%F A122117 a(n) = Sum_{k=0..n} A122016(n,k)*2^k. - _Philippe Deléham_, Nov 05 2008
%F A122117 a(n) = A100088(2*n). - _Chai Wah Wu_, Apr 22 2025
%t A122117 CoefficientList[Series[(1-x)/(1-3*x-4*x^2),{x,0,30}],x] (* _Vincenzo Librandi_, Jul 06 2012 *)
%o A122117 (Sage) from sage.combinat.sloane_functions import recur_gen2b; it = recur_gen2b(1,2,3,4, lambda n: 0); [next(it) for i in range(24)] # _Zerinvary Lajos_, Jul 03 2008
%o A122117 (Sage) ((1-x)/(1-3*x-4*x^2)).series(x, 30).coefficients(x, sparse=False) # _G. C. Greubel_, May 18 2019
%o A122117 (PARI) Vec((1-x)/(1-3*x-4*x^2)+O(x^30)) \\ _Charles R Greathouse IV_, Jan 11 2012
%o A122117 (Magma) I:=[1, 2]; [n le 2 select I[n] else 3*Self(n-1)+4*Self(n-2): n in [1..30]]; // _Vincenzo Librandi_, Jul 06 2012
%o A122117 (GAP) a:=[1,2];; for n in [3..30] do a[n]:=3*a[n-1]+4*a[n-2]; od; a; # _G. C. Greubel_, May 18 2019
%o A122117 (Python)
%o A122117 def A122117(n): return ((4<<(m:=n<<1))|2)//5-((1<<m)|2)//5 # _Chai Wah Wu_, Apr 22 2025
%Y A122117 Cf. A055380, A100088, A108981, A122016, A201455.
%K A122117 nonn,easy
%O A122117 0,2
%A A122117 _Philippe Deléham_, Oct 19 2006
%E A122117 Corrected by _T. D. Noe_, Nov 07 2006