%I #105 Jun 27 2023 11:17:18
%S 3,4,6,10,18,34,66,130,258,514,1026,2050,4098,8194,16386,32770,65538,
%T 131074,262146,524290,1048578,2097154,4194306,8388610,16777218,
%U 33554434,67108866,134217730,268435458,536870914,1073741826,2147483650
%N a(n) = 2^n + 2.
%C The most "compact" sequence that satisfies Bertrand's Postulate. Begin with a(1) = 3 = n, then 2n - 2 = 4 = n_1, 2n_1 - 2 = 6 = n_2, 2n_2 - 2 = 10, etc. = a(n), hence there is guaranteed to be at least one prime between successive members of the sequence. - _Andrew S. Plewe_, Dec 11 2007
%C Number of 2-sided prudent polygons of area n, for n>0, see Beaton, p. 5. - _Jonathan Vos Post_, Nov 30 2010
%H Vincenzo Librandi, <a href="/A052548/b052548.txt">Table of n, a(n) for n = 0..240</a>
%H Nicholas R. Beaton, Philippe Flajolet, and Anthony J. Guttmann, <a href="http://arxiv.org/abs/1011.6195">The Enumeration of Prudent Polygons by Area and its Unusual Asymptotics</a>, arXiv:1011.6195 [math.CO], Nov 29, 2010.
%H INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=485">Encyclopedia of Combinatorial Structures 485</a>
%H Popular Computing (Calabasas, CA), <a href="/A003309/a003309.pdf">Sieves: Problem 43</a>, Vol. 2 (No. 13, Apr 1974), pp. 6-7. This is Sieve #6 with K=2. [Annotated and scanned copy]
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/BertrandsPostulate.html">Bertrand's Postulate</a>
%H <a href="/index/Si#sieve">Index entries for sequences generated by sieves</a>
%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (3,-2).
%F G.f.: (3-5*x)/((1-2*x)*(1-x)) = (3-5*x)/(1 - 3*x + 2*x^2) = 2/(1-x) + 1/(1-2*x).
%F a(0)=3, a(1)=4, a(n) = 3*a(n-1) - 2*a(n-2).
%F a(n) = A058896(n)/A000918(n), for n>0. - _Reinhard Zumkeller_, Feb 14 2009
%F a(n) = A173786(n,1), for n>0. - _Reinhard Zumkeller_, Feb 28 2010
%F a(n)*A000918(n) = A028399(2*n), for n>0. - _Reinhard Zumkeller_, Feb 28 2010
%F a(0)=3, a(n) = 2*a(n-1) - 2. - _Vincenzo Librandi_, Aug 06 2010
%F E.g.f.: (2 + exp(x))*exp(x). - _Ilya Gutkovskiy_, Aug 16 2016
%p spec := [S,{S=Union(Sequence(Union(Z,Z)),Sequence(Z),Sequence(Z))},unlabeled]: seq(combstruct[count](spec,size=n), n=0..20);
%t 2^Range[0,40]+2 (* _Harvey P. Dale_, Jun 26 2012 *)
%o (Magma) [2^n + 2: n in [0..35]]; // _Vincenzo Librandi_, Apr 29 2011
%o (PARI) a(n)=1<<n+2 \\ _Charles R Greathouse IV_, Nov 20 2011
%o (Haskell)
%o a052548 = (+ 2) . a000079
%o a052548_list = iterate ((subtract 2) . (* 2)) 3
%o -- _Reinhard Zumkeller_, Sep 05 2015
%Y Apart from initial term, same as A056469.
%Y Cf. A003462, A007051, A034472, A024023, A067771, A029858, A134931, A115099, A100774, A079004, A058481, A100585, A100586, A058896, A000918, A173786.
%Y Cf. also A000079, A000051, A100314.
%K easy,nonn
%O 0,1
%A encyclopedia(AT)pommard.inria.fr, Jan 25 2000
%E More terms from _James A. Sellers_, Jun 06 2000