login
Decimal expansion of limiting difference of n - Sum_{k=0..n} cos(Pi/2^k).
1

%I #16 Aug 26 2023 03:14:41

%S 2,3,9,4,6,4,9,8,0,2,1,2,5,1,6,5,5,5,9,2,2,1,0,0,3,1,4,2,7,1,2,0,7,3,

%T 0,9,3,9,1,1,5,4,7,1,9,2,5,6,1,2,3,0,4,1,2,3,0,8,3,0,9,3,8,4,5,8,3,3,

%U 3,3,8,1,5,8,8,5,8,9,1,8,6,9,9,3,8,4,9

%N Decimal expansion of limiting difference of n - Sum_{k=0..n} cos(Pi/2^k).

%H G. C. Greubel, <a href="/A120703/b120703.txt">Table of n, a(n) for n = 1..10000</a>

%F Lim_{n->oo} (n - Sum_{k=0..n} cos(Pi/2^k)).

%F Equals -1 + 2*Sum_{k=0..oo} (sin(2*Pi/2^k))^2. - _G. C. Greubel_, Aug 25 2023

%e 2.3946498021251655592210031427120730939115471925612304123083093845833338...

%t N[n - Sum[Cos[Pi/2^k], {k, 0, n}] /. n -> 300, 80] RealDigits[%, 10]

%t RealDigits[-1 +2*Sum[Sin[2*Pi/2^k]^2, {k,0,1000}], 10, 155][[1]] (* _G. C. Greubel_, Aug 25 2023 *)

%o (Magma) R:= RealField(151); -1 + 2*(&+[ Sin(Pi(R)/2^(k-1))^2 : k in [0..1000]]) // _G. C. Greubel_, Aug 25 2023

%o (SageMath) numerical_approx( -1 + 2*sum( sin(pi/2^(k-1))^2 for k in range(1001)), digits=150) # _G. C. Greubel_, Aug 25 2023

%K cons,nonn

%O 1,1

%A Joseph Biberstine (jrbibers(AT)indiana.edu), Jun 28 2006

%E More digits from _Jon E. Schoenfield_, Mar 21 2021