cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A144981 Decimal expansion of cos(Pi/8) = cos(22.5 degrees).

Original entry on oeis.org

9, 2, 3, 8, 7, 9, 5, 3, 2, 5, 1, 1, 2, 8, 6, 7, 5, 6, 1, 2, 8, 1, 8, 3, 1, 8, 9, 3, 9, 6, 7, 8, 8, 2, 8, 6, 8, 2, 2, 4, 1, 6, 6, 2, 5, 8, 6, 3, 6, 4, 2, 4, 8, 6, 1, 1, 5, 0, 9, 7, 7, 3, 1, 2, 8, 0, 5, 3, 5, 0, 0, 7, 5, 0, 1, 1, 0, 2, 3, 5, 8, 7, 1, 4, 8, 3, 9, 9, 3, 4, 8, 5, 0, 3, 4, 4, 5, 9, 6, 0, 9, 7, 9, 6, 3
Offset: 0

Views

Author

R. J. Mathar, Sep 28 2008

Keywords

Comments

Also the real part of i^(1/4). - Stanislav Sykora, Apr 25 2012
Width of a regular octagon of unit diameter. See Bingane and Audet. - Michel Marcus, Oct 04 2021
Minimal polynomial 8x^4 - 8x^2 + 1. - Charles R Greathouse IV, Oct 30 2023
Also the ratio (1+sqrt(2))/sqrt(4+2*sqrt(2)) of the radii and perimeters of the inscribed and circumscribed circles of a regular octagon. This and the first two comments are actually all equivalent. - M. F. Hasler, Aug 13 2025

Examples

			Equals 0.923879532511286756128183189396788286822416625863642486115097...
		

Crossrefs

Cf. A019863: cos(Pi/5), A010527: cos(Pi/6), A073052: cos(Pi/7), A019879: cos(Pi/9).

Programs

  • Maple
    evalf(sqrt(2+sqrt(2))/2) ;
  • Mathematica
    RealDigits[ Sqrt[2 + Sqrt[2]]/2, 10, 111][[1]] (* Or *) RealDigits[ Cos[Pi/8], 10, 111][[1]] (* Robert G. Wilson v *)
  • PARI
    cos(Pi/8) \\ Michel Marcus, Dec 15 2015
    
  • Python
    from math import isqrt # integer arithmetic, avoiding 10^(4N) in inner isqrt
    def A144981_first(N=99): return [9] if N<2 else list(map(int,str(
        isqrt(isqrt(100**(N+2)>>3)*10**(N-2)+100**N//2)))) # M. F. Hasler, Aug 13 2025
  • SageMath
    numerical_approx(sqrt(2+sqrt(2))/2, digits=120) # G. C. Greubel, Sep 04 2022
    

Formula

Equals sqrt(2 + sqrt(2))/2 = sqrt(3.41421...)/2 = 1.8477759.../2.
Equals Hypergeometric2F1([11/16, 5/16], [1/2], 3/4) / 2. - R. J. Mathar, Oct 27 2008