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!)
A036562 a(n) = 4^(n+1) + 3*2^n + 1. 16

%I #50 Mar 05 2022 14:12:47

%S 1,8,23,77,281,1073,4193,16577,65921,262913,1050113,4197377,16783361,

%T 67121153,268460033,1073790977,4295065601,17180065793,68719869953,

%U 274878693377,1099513200641,4398049656833,17592192335873,70368756760577

%N a(n) = 4^(n+1) + 3*2^n + 1.

%H Vincenzo Librandi, <a href="/A036562/b036562.txt">Table of n, a(n) for n = -1..1000</a>

%H Robert Sedgewick, <a href="http://www.cs.princeton.edu/~rs/talks/shellsort.ps">Analysis of shellsort and related algorithms</a>, Fourth European Symposium on Algorithms, Barcelona, September, 1996.

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

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (7,-14,8).

%F a(n) = (1/2)*(A028401(n+4) + 1) for n > -1.

%F G.f.: (1+x-19*x^2+20*x^3)/(x*(1-x)*(1-2*x)*(1-4*x)). - _Colin Barker_, Mar 09 2012

%F a(n) = 7*a(n-1)-14*a(n-2)+8*a(n-3), for n>=3. - _Wesley Ivan Hurt_, Apr 26 2021

%t CoefficientList[Series[x*(1+x-19*x^2+20*x^3)/(x*(1-x)*(1-2*x)*(1-4*x)),{x,0,30}],x] (* _Vincenzo Librandi_, Apr 24 2012 *)

%o (Magma) [1]cat[4^(n+1)+3*2^n+1:n in [0..30]]; // _Vincenzo Librandi_, Apr 24 2012

%o (PARI) a(n)=4^(n+1)+3*2^n+1 \\ _Charles R Greathouse IV_, Apr 24 2012

%o (Python)

%o def a(n): return 1 if n == -1 else (pow(4,n+1)+3*pow(2,n)+1)

%o print([a(n) for n in range(-1, 100)]) # _Javier Rivera Romeu_, Mar 05 2022

%Y Sequences used for Shell sort: A003462, A033622, A036562, A036564, A036569, A055875, A055876.

%K nonn,easy

%O -1,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 18 11:48 EDT 2024. Contains 371779 sequences. (Running on oeis4.)