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.

A014131 a(n) = 2*a(n-1) if n odd else 2*a(n-1) + 6.

This page as a plain text file.
%I A014131 #19 Aug 26 2024 19:07:25
%S A014131 0,6,12,30,60,126,252,510,1020,2046,4092,8190,16380,32766,65532,
%T A014131 131070,262140,524286,1048572,2097150,4194300,8388606,16777212,
%U A014131 33554430,67108860,134217726,268435452,536870910
%N A014131 a(n) = 2*a(n-1) if n odd else 2*a(n-1) + 6.
%H A014131 Vincenzo Librandi, <a href="/A014131/b014131.txt">Table of n, a(n) for n = 0..1000</a>
%H A014131 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (2, 1, -2).
%F A014131 a(n) = 3*A026644(n), n > 0. [moved from A020988 by _R. J. Mathar_, Oct 21 2008]
%F A014131 From _R. J. Mathar_, Oct 21 2008: (Start)
%F A014131 G.f.: 6x/((1-2x)(1-x)(1+x)).
%F A014131 a(n) = 2^(n+2) - 3 - (-1)^n. (End)
%t A014131 Table[2^(n+2)-3-(-1)^n,{n,0,40}] (* or *) CoefficientList[Series[6x/((1-2x)(1-x)(1+x)),{x,0,30}],x] (* _Vincenzo Librandi_, Apr 03 2012 *)
%t A014131 nxt[{n_,a_}]:={n+1,If[EvenQ[n],2a,2a+6]}; NestList[nxt,{1,0},30][[;;,2]] (* or *) LinearRecurrence[ {2,1,-2},{0,6,12},30] (* _Harvey P. Dale_, Aug 26 2024 *)
%o A014131 (Magma) [2^(n+2)-3-(-1)^n: n in [0..30]]; // _Vincenzo Librandi_, Apr 03 2012
%Y A014131 Cf. A000975.
%K A014131 nonn
%O A014131 0,2
%A A014131 _N. J. A. Sloane_