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.

A131671 Decimal expansion of prime analog of the Kepler-Bouwkamp constant: Product_{k>=2} cos(Pi/prime(k)).

Original entry on oeis.org

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

Views

Author

R. J. Mathar, Sep 12 2007

Keywords

Examples

			cos(Pi/3)*cos(Pi/5)*cos(Pi/7)*cos(Pi/11)*(...) = 0.312832929508881838333...
		

Crossrefs

Cf. A085365.

Programs

  • Maple
    read("transforms") ;
    Digits := 300 ;
    ZetaM := proc(s,M)
        local v,p;
        v := Zeta(s) ;
        p := 2;
        while p <= M do
            v := v*(1-1/p^s) ;
            p := nextprime(p) ;
        end do:
        v ;
    end proc:
    T := 40 ;
    preT := 0.0 ;
    while true do
        cos(Pi/p) ;
        subs(p=1/x,%) ;
        t := taylor(%,x=0,T) ;
        L := [] ;
        for i from 1 to T-1 do
            L := [op(L),evalf(coeftayl(t,x=0,i))] ;
        end do:
        Le := EULERi(L) ;
        v := 1.0 ;
        pre := 0.0 ;
        for i from 2 to nops(Le) do
            pre := v ;
            v := v*evalf(ZetaM(i,2))^op(i,Le) ;
        end do:
        pre := (v+pre)/2. ;
        printf("%.80f\n",pre) ;
        if abs(1.0-preT/pre)  < 10^(-Digits/3) then
            break;
        end if;
        preT := pre ;
        T := T+15 ;
    end do: # R. J. Mathar, Jan 23 2013
  • Mathematica
    Block[{$MaxExtraPrecision=1000}, Do[Print[Exp[-Sum[N[(2^(2k)-1)*Zeta[2k]/k*(PrimeZetaP[2k]-1/2^(2k)), 120],{k,1,m}]]], {m,300,350}]] (* Vaclav Kotesovec, Jun 02 2015 *)
  • PARI
    primezeta(n)=sum(k=1, lambertw(10.^default(realprecision)*log(4)) \log(4)+1, moebius(k)*log(zeta(n*k))/k)
    exp(-suminf(k=1,(4^k-1)*zeta(2*k)/k*(primezeta(2*k)-1/4^k))) \\ M. F. Hasler and Charles R Greathouse IV, May 28 2015

Formula

Product_{p odd prime} cos(Pi/p) where Pi = 3.14159...
The log of this constant is equal to Sum_{k>=1} (1 - 2^(2*k))*zeta(2*k)/k * (P(2*k) - 1/2^(2*k)), where P(s) is the prime zeta function. - Amiram Eldar, Aug 21 2020

Extensions

More digits from R. J. Mathar, Mar 01 2009, Jan 23 2013
Edited by M. F. Hasler, May 18 2014
More digits from Vaclav Kotesovec, Jun 02 2015