Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #21 Aug 23 2022 09:52:33
%S 1,1,9,5,9,5,5,7,8,6,0,1,7,5,1,3,5,9,6,0,0,3,4,7,4,8,0,0,0,2,1,3,0,2,
%T 0,2,0,2,7,5,5,1,6,2,0,9,5,8,2,5,9,8,4,8,6,4,8,7,3,3,8,8,3,6,2,8,5,0,
%U 9,1,2,6,9,0,6,1,3,7,6,8,2,2,2,0,5,4
%N Decimal expansion of Sum_{n>=1} |phi - c(n)|, where phi is the golden ratio (A001622) and c(n) are the convergents to phi.
%C Define the deviance of x > 0 by dev(x) = Sum_{n>=1} |x - c(n,x)|, where c(n,x) = n-th convergent to x. The greatest value of dev(x) occurs when x = golden ratio, so that this constant is the maximal deviance.
%F Equals Sum_{n>=1} 1/(F(2*n-1)*F(2*n)), where F(n) is the n-th Fibonacci number (A000045).
%F From _Amiram Eldar_, Oct 05 2020: (Start)
%F Equals Sum_{k>=1} 1/(phi^k * F(k)).
%F Equals sqrt(5) * Sum_{k>=1} 1/(phi^(2*k) - (-1)^k) = sqrt(5) * Sum_{k>=1} (-1)^(k+1)/(phi^(2*k) + (-1)^k).
%F Equals (A290565 + 1/phi)/2. (End)
%F A rapidly converging series for the constant is sqrt(5)*Sum_{k >= 1} x^(k^2)*(1 + x^(2*k))/(1 - x^(2*k)), where x = (3 - sqrt(5))/2. See A112329. - _Peter Bala_, Aug 21 2022
%e 1.195955786017513596003474800021...
%p x := (3 - sqrt(5))/2:
%p evalf(sqrt(5)*add(x^(n^2)*(1 + x^(2*n))/(1 - x^(2*n)), n = 1..16), 100); # _Peter Bala_, Aug 21 2022
%t x = GoldenRatio; z = 600; c = Convergents[x, z];
%t s1 = Sum[x - c[[2 k - 1]], {k, 1, z/2}]; N[s1, 200]
%t s2 = Sum[c[[2 k]] - x, {k, 1, z/2}]; N[s2, 200]
%t N[s1 + s2, 200]
%t RealDigits[s1, 10, 120][[1]] (* A265288 *)
%t RealDigits[s2, 10, 120][[1]] (* A265289 *)
%t RealDigits[s1 + s2, 10, 120][[1]] (* A265290, dev(x) *)
%t d[x_] := If[IntegerQ[1000!*x], Total[Abs[x - Convergents[x]]],
%t Total[Abs[x - Convergents[x, 30]]]]
%t Plot[{d[x], 1.195}, {x, 0, 1}]
%Y Cf. A000045, A001622, A290565.
%Y Cf. A265288, A265289.
%K nonn,cons
%O 1,3
%A _Clark Kimberling_, Dec 06 2015