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!)
A155996 Nearest integer to 2^n*Pi/4. 2

%I #19 Oct 19 2023 09:07:51

%S 1,2,3,6,13,25,50,101,201,402,804,1608,3217,6434,12868,25736,51472,

%T 102944,205887,411775,823550,1647099,3294199,6588397,13176795,

%U 26353589,52707179,105414357,210828714,421657428,843314857,1686629713,3373259426,6746518852

%N Nearest integer to 2^n*Pi/4.

%C a(n)/2^n is the closest approximation to Pi/4 using n+1 bits, where the most significant one has weight 1.

%e The first approximations to Pi/4 are given in the following table.

%e ---+--------+-----------------------+----------------

%e n -+- a(n) -+- a(n)/2^n (n+1 bits) --- decimal value

%e ---+--------+-----------------------+----------------

%e 0 -+- 1 ----+------ 1 --------------+- 1

%e 1 -+- 2 ----+------ 1.0 ------------+- 1

%e 2 -+- 3 ----+------ 0.11 -----------+- 0.75

%e 3 -+- 6 ----+------ 0.110 ----------+- 0.75

%e 4 -+- 13 ---+------ 0.1101 ---------+- 0.8125

%e 5 -+- 25 ---+------ 0.11001 --------+- 0.78125

%e 6 -+- 50 ---+------ 0.110010 -------+- 0.78125

%e 7 -+- 101 --+------ 0.1100101 ------+- 0.7890625

%e 8 -+- 201 --+------ 0.11001001 -----+- 0.78515625

%e ------------------------------- Pi/4 = 0.785398...

%t Round[2^Range[0,40] Pi/4] (* _Harvey P. Dale_, Apr 06 2013 *)

%o (PARI) a(n)=round(2^n*Pi/4)

%Y a(n)-2a(n-1)=A155482(-n), Cf. A068425.

%Y Cf. A121349. [_R. J. Mathar_, Feb 08 2009]

%Y Cf. A003881.

%K nonn

%O 0,2

%A _Jaume Oliver Lafont_, Feb 01 2009

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 11:24 EDT 2024. Contains 371967 sequences. (Running on oeis4.)