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.

A123208 Start with 1, then alternately add 2 or double.

This page as a plain text file.
%I A123208 #48 Dec 16 2023 17:45:38
%S A123208 1,3,6,8,16,18,36,38,76,78,156,158,316,318,636,638,1276,1278,2556,
%T A123208 2558,5116,5118,10236,10238,20476,20478,40956,40958,81916,81918,
%U A123208 163836,163838,327676,327678,655356,655358,1310716,1310718,2621436,2621438,5242876,5242878
%N A123208 Start with 1, then alternately add 2 or double.
%H A123208 Vincenzo Librandi, <a href="/A123208/b123208.txt">Table of n, a(n) for n = 0..1000</a>
%H A123208 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,3,0,-2).
%F A123208 a(2n) = 5*2^n - 4; a(2n+1) = 5*2^n - 2 (n >= 0). - _Emeric Deutsch_, Oct 10 2006
%F A123208 From _Colin Barker_, Sep 10 2012: (Start)
%F A123208 a(n) = 3*a(n-2) - 2*a(n-4).
%F A123208 G.f.: (1+3*x+3*x^2-x^3)/((1-x)*(1+x)*(1-2*x^2)). (End)
%F A123208 a(2n) = A048487(n); a(2n+1) = A051633(n). - _Philippe Deléham_, Apr 15 2013
%F A123208 E.g.f.: 5*cosh(sqrt(2)*x) - 4*cosh(x) + 5*sinh(sqrt(2)*x)/sqrt(2) - 2*sinh(x). - _Stefano Spezia_, Oct 03 2023
%e A123208 1, 1+2=3, 3*2=6, 6+2=8, 8*2=16, ...
%p A123208 a:=proc(n) if n mod 2 = 0 then 5*2^(n/2)-4 else 5*2^((n-1)/2)-2 fi end: seq(a(n),n=0..45); # _Emeric Deutsch_, Oct 10 2006
%t A123208 nxt[{a_,b_}]:={b+2,2(b+2)}; Rest[Flatten[NestList[nxt,{1,1},20]]] (* or *) LinearRecurrence[{0,3,0,-2},{1,3,6,8},40] (* _Harvey P. Dale_, Oct 10 2012 *)
%t A123208 CoefficientList[Series[(1 + 3 x + 3 x^2 - x^3) / ((1 - x) (1 + x) (1 - 2 x^2)), {x, 0, 40}], x] (* _Vincenzo Librandi_, Jun 25 2013 *)
%o A123208 (Magma) m:=50; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!((1+3*x+3*x^2-x^3)/((1-x^2)*(1-2*x^2)))); // _Vincenzo Librandi_, Jun 25 2013
%Y A123208 Cf. A048487, A051633.
%K A123208 easy,nonn
%O A123208 0,2
%A A123208 _Philippe Deléham_, Oct 04 2006
%E A123208 More terms from _Emeric Deutsch_, Oct 10 2006