login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A126646 a(n) = 2^(n+1) - 1. 48

%I #77 Mar 19 2024 03:21:05

%S 1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,

%T 131071,262143,524287,1048575,2097151,4194303,8388607,16777215,

%U 33554431,67108863,134217727,268435455,536870911,1073741823,2147483647

%N a(n) = 2^(n+1) - 1.

%C a(n) is the number of integers k less than 10^n such that the decimal representation of k lacks the digits 1,2,3,4,5,6 and 7 and at least one of the digits 8,9.

%C Partial sums of the powers of 2 (A000079).

%C a(n) is the number of elements (all m-dimensional faces) in an n-dimensional simplex (0 <= m <= n). - _Sergey Pavlov_, Aug 15 2015

%C A261461(a(n)) != A261922(a(n)). - _Reinhard Zumkeller_, Sep 17 2015

%C a(n) is the total number of matches in a knockout tournament with 2^n players. - _Paul Duckett_, Dec 12 2022

%H G. C. Greubel, <a href="/A126646/b126646.txt">Table of n, a(n) for n = 0..1000</a>

%H Milan Janjic, <a href="http://www.pmfbl.org/janjic/">Enumerative Formulas for Some Functions on Finite Sets</a>

%H Jerry Metzger and Thomas Richards, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL18/Metzger/metz1.html">A Prisoner Problem Variation</a>, Journal of Integer Sequences, Vol. 18 (2015), Article 15.2.7.

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Simplex#Elements">Simplex Elements</a> (see last column of table).

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

%F a(n-1)^2 + a(n) = a(2n) + 1, a square. - _Vincenzo Librandi_ and _Ralf Stephan_, Nov 23 2010

%F G.f.: 1/ ( (1-2*x)*(1-x) ). - _R. J. Mathar_, Dec 02 2013

%F a(n) = 3*a(n-1) - 2*a(n-2), n > 1. - _Wesley Ivan Hurt_, Aug 21 2015

%F E.g.f.: 2*exp(2*x) - exp(x). - _G. C. Greubel_, Mar 31 2021

%e a(8) = 2^9 - 1 = 511.

%p A126646:=n->2*2^n-1; seq(A126646(n), n=0..50); # _Wesley Ivan Hurt_, Dec 02 2013

%t Table[2^(n+1) - 1, {n, 0, 50}] (* _Wesley Ivan Hurt_, Dec 02 2013 *)

%t LinearRecurrence[{3,-2},{1,3},40] (* _Harvey P. Dale_, Mar 23 2018 *)

%o (PARI) first(m)=vector(m,i,i--;2^(i+1)-1) /* _Anders Hellström_, Aug 19 2015 */

%o (Magma) [2^(n+1)-1: n in [0.. 35]]; // _Vincenzo Librandi_, Aug 20 2015

%o (Haskell)

%o a126646 = (subtract 1) . (2 ^) . (+ 1)

%o a126646_list = iterate ((+ 1) . (* 2)) 1

%o -- _Reinhard Zumkeller_, Sep 17 2015

%o (Sage) [2^(n+1) -1 for n in (0..50)] # _G. C. Greubel_, Mar 31 2021

%o (Python)

%o def A126646(n): return (1<<n+1)-1 # _Chai Wah Wu_, Mar 18 2024

%Y Essentially the same as A000225.

%Y Cf. A125630, A125945, A125947, A125948, A125940, A125909, A125908, A125880, A125897, A125904, A125858.

%Y Cf. A000079, A168604.

%Y Cf. A261461, A261922.

%K nonn,easy

%O 0,2

%A Aleksandar M. Janjic and _Milan Janjic_, Feb 08 2007, Feb 13 2007

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)