This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A155996 Nearest integer to 2^n*Pi/4. 1
 1, 2, 3, 6, 13, 25, 50, 101, 201, 402, 804, 1608, 3217, 6434, 12868, 25736, 51472, 102944, 205887, 411775, 823550, 1647099, 3294199, 6588397, 13176795, 26353589, 52707179, 105414357, 210828714, 421657428, 843314857, 1686629713, 3373259426 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,2 COMMENTS a(n)/2^n is the closest approximation to Pi/4 using n+1 bits, where the most significant one has weight 1. LINKS FORMULA a(n) = -floor(2^(-2 + n)*Pi) + floor(2^(-1 + n)*Pi), n>=0. - Mariusz Iwaniuk, Apr 30 2017 EXAMPLE The first approximations to Pi/4 are given in the following table. ---+--------+-----------------------+---------------- n -+- a(n) -+- a(n)/2^n (n+1 bits) --- decimal value ---+--------+-----------------------+---------------- 0 -+- 1 ----+------ 1 --------------+- 1 1 -+- 2 ----+------ 1.0 ------------+- 1 2 -+- 3 ----+------ 0.11 -----------+- 0.75 3 -+- 6 ----+------ 0.110 ----------+- 0.75 4 -+- 13 ---+------ 0.1101 ---------+- 0.8125 5 -+- 25 ---+------ 0.11001 --------+- 0.78125 6 -+- 50 ---+------ 0.110010 -------+- 0.78125 7 -+- 101 --+------ 0.1100101 ------+- 0.7890625 8 -+- 201 --+------ 0.11001001 -----+- 0.78515625 ------------------------------- Pi/4 = 0.785398... MATHEMATICA Round[2^Range[0, 40] Pi/4] (* Harvey P. Dale, Apr 06 2013 *) PROG (PARI) a(n)=round(2^n*Pi/4) CROSSREFS a(n)-2a(n-1)=A155482(-n), Cf. A068425. Cf. A121349. [R. J. Mathar, Feb 08 2009] Cf. A003881. Sequence in context: A239326 A075530 A032061 * A240104 A018274 A018775 Adjacent sequences:  A155993 A155994 A155995 * A155997 A155998 A155999 KEYWORD nonn AUTHOR Jaume Oliver Lafont, Feb 01 2009 STATUS approved

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

Last modified October 13 18:14 EDT 2019. Contains 327981 sequences. (Running on oeis4.)