[go: up one dir, main page]

login
a(0) = 1; a(n) = 3*2^n - 1, for n > 0.
15

%I #85 Oct 15 2023 21:02:58

%S 1,5,11,23,47,95,191,383,767,1535,3071,6143,12287,24575,49151,98303,

%T 196607,393215,786431,1572863,3145727,6291455,12582911,25165823,

%U 50331647,100663295,201326591,402653183,805306367,1610612735,3221225471,6442450943,12884901887

%N a(0) = 1; a(n) = 3*2^n - 1, for n > 0.

%C A simple regular expression.

%C Numbers k > 1 such that a(k-1)^2 + a(k) is square, e.g., 5^2 + 11 = 6^2; 11^2 + 23 = 12^2. - _Vincenzo Librandi_, Aug 06 2010

%C Numerator of the sum of terms at the n-th level of the Calkin-Wilf tree. - _Carl Najafi_, Jul 10 2011

%H Michael De Vlieger, <a href="/A052940/b052940.txt">Table of n, a(n) for n = 0..3320</a>

%H Gennady Eremin, <a href="https://arxiv.org/abs/2302.02765">Dyck Numbers, III. Enumeration and bijection with symmetric Dyck paths</a>, arXiv:2302.02765 [math.CO], 2023.

%H INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=931">Encyclopedia of Combinatorial Structures 931</a>

%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (3,-2).

%F G.f.: (1+2*x-2*x^2)/((1-x)*(1-2*x)).

%F a(n) = 3*a(n-1) - 2*a(n-2) for n > 2.

%F Binomial transform of 3 - 0^n - (-1)^n = (1, 4, 2, 4, 2, 4, 2, ...). - _Paul Barry_, Jun 30 2003

%F a(n) = A107909(A023548(n+1)) for n > 1. - _Reinhard Zumkeller_, May 28 2005

%F Row sums of triangle A134060. - _Gary W. Adamson_, Oct 05 2007

%F Equals row sums of triangle A140182. - _Gary W. Adamson_, May 11 2008

%F Equals M*Q, where M is a modified Pascal triangle (1,2) with first term "1" instead of 2; as an infinite lower triangular matrix. Q is the vector (1, 2, 2, 2, ...). - _Gary W. Adamson_, Nov 30 2015

%F From _Gennady Eremin_, Aug 29 2023: (Start)

%F a(n+1) = 2*a(n) + 1 for n > 0.

%F a(n) = (A000225(n+1) + A000225(n+2))/2 for n > 0. (End)

%p spec:= [S,{S=Prod(Sequence(Union(Z,Z)),Union(Sequence(Z),Z,Z))},unlabeled ]: seq(combstruct[count ](spec,size=n), n=0..20);

%p seq(`if`(n=0,1,3*2^n -1), n=0..30); # _G. C. Greubel_, Oct 18 2019

%t Join[{1},Table[3*2^n-1,{n,30}]] (* or *) Join[{1},LinearRecurrence[{3,-2},{5,11},30]] (* _Harvey P. Dale_, Mar 07 2015 *)

%o (PARI) a(n)=if(n,3*2^n-1,1) \\ _Charles R Greathouse IV_, Oct 07 2015

%o (PARI) Vec((1+2*x-2*x^2)/(-1+2*x)/(-1+x) + O(x^30)) \\ _Altug Alkan_, Dec 01 2015

%o (Magma) [1] cat [3*2^n - 1: n in [1..30]]; // _Vincenzo Librandi_, Dec 01 2015

%o (Sage) [1]+[3*2^n -1 for n in (1..30)] # _G. C. Greubel_, Oct 18 2019

%o (GAP) Concatenation([1], List([1..30], n-> 3*2^n -1)); # _G. C. Greubel_, Oct 18 2019

%o (Python)

%o print([1] + [(3<<n)-1 for n in range(1,30)]) # _Gennady Eremin_, Aug 29 2023

%Y Apart from initial terms, same as A055010 and A083329.

%Y Subsequence of A036991.

%Y Cf. A000225, A023548, A107909, A134060, A140182.

%K easy,nonn

%O 0,2

%A encyclopedia(AT)pommard.inria.fr, Jan 25 2000

%E More terms from _James A. Sellers_, Jun 08 2000

%E a(30)-a(32) from _Vincenzo Librandi_, Dec 01 2015