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!)
A036564 a(n) = 2^n - 45 with n>5, a(5)=1. 12

%I #72 Dec 03 2023 18:21:32

%S 1,19,83,211,467,979,2003,4051,8147,16339,32723,65491,131027,262099,

%T 524243,1048531,2097107,4194259,8388563,16777171,33554387,67108819,

%U 134217683,268435411,536870867,1073741779,2147483603,4294967251

%N a(n) = 2^n - 45 with n>5, a(5)=1.

%H Vincenzo Librandi, <a href="/A036564/b036564.txt">Table of n, a(n) for n = 5..1000</a>

%H Robert Sedgewick, <a href="https://sedgewick.io/wp-content/themes/sedgewick/papers/1996Shellsort.pdf">Analysis of shellsort and related algorithms</a>, Fourth European Symposium on Algorithms, Barcelona, September, 1996.

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

%H <a href="/index/So#sorting">Index entries for sequences related to sorting</a>

%F G.f.: x^5*(1+2*x)*(1+14*x)/((1-x)*(1-2*x)). [_Colin Barker_, Mar 09 2012]

%t A036564[n_]:=If[n>5,2^n-45,1];Array[A036564,50,5] (* or *)

%t LinearRecurrence[{3,-2},{1,19,83},50] (* _Paolo Xausa_, Dec 03 2023 *)

%o (PARI) a(n)=if(n>5,2^n-45,1) \\ _Charles R Greathouse IV_, Mar 10 2012

%o (Python)

%o def a(n): return pow(2, n)-45 if n!= 5 else 1

%o for n in range(5, 100): print(a(n), end=', ') # _Javier Rivera Romeu_, Mar 04 2022

%Y Sequences used for Shell sort: this sequence, A003462, A033622, A036562, A036569, A055875.

%K nonn,easy

%O 5,2

%A _N. J. A. Sloane_

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 25 12:15 EDT 2024. Contains 371969 sequences. (Running on oeis4.)