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
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, 6746518852 (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
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: A075530 A032061 A350435 * A240104 A018274 A018775
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 16:52 EDT 2024. Contains 371794 sequences. (Running on oeis4.)