OFFSET
1,2
COMMENTS
The rational approximation x ~ 7554425181395669/4503599627370495 is accurate to many thousands of digits.
A "devil's staircase" type of constant with large partial quotients in its continued fraction expansion. See MathWorld link for more information.
LINKS
Eric Weisstein's World of Mathematics, Devil's Staircase.
FORMULA
The constant x may be calculated using the following formulas.
(1) x = 1 + Sum_{n>=1} 1 / 2^floor(n*x).
(2) x = 1 + Sum_{n>=1} floor(n/x) / 2^n.
(3) x = 2 - Sum_{n>=1} 1 / 2^floor(n*x/(x-1)).
(4) x = 2 - Sum_{n>=1} floor(n*(x-1)/x) / 2^n.
EXAMPLE
x = 1.677419354838709670256625647579633632627970647...
The continued fraction begins (next term is too large to show)
x = [1; 1, 2, 10, 145277407334532, ...]
giving the rational approximation
x ~ 1 + 1/(1 + 1/(2 + 1/(10 + 1/145277407334532))), or
x ~ 7554425181395669/4503599627370495.
RELATED SEQUENCES.
A related Beatty sequence A391809 is
[1, 3, 5, 6, 8, 10, 11, 13, 15, 16, 18, 20, 21, ..., floor(n*x), ...],
where x = 1 + 1/2^1 + 1/2^3 + 1/2^5 + 1/2^6 + 1/2^8 + 1/2^10 + 1/2^11 + 1/2^13 + 1/2^15 + 1/2^16 + 1/2^18 + 1/2^20 + 1/2^21 + ... + 1/2^floor(n*x) + ...
A slower way to calculate x uses the numerators given by
[0, 1, 1, 2, 2, 3, 4, 4, 5, 5, 6, 7, 7, 8, 8, 9, ..., floor(n/x), ...],
where x = 1 + 0/2 + 1/2^2 + 1/2^3 + 2/2^4 + 2/2^5 + 3/2^6 + 4/2^7 + 4/2^8 + 5/2^9 + 5/2^10 + 6/2^11 + 7/2^12 + 7/2^13 + ... + floor(n/x)/2^n + ...
The complementary Beatty sequence to A391809 begins
[2, 4, 7, 9, 12, 14, 17, 19, 22, 24, 27, 29, ..., floor(n*x/(x-1)), ...]
where x = 2 - (1/2^2 + 1/2^4 + 1/2^7 + 1/2^9 + 1/2^12 + 1/2^14 + 1/2^17 + 1/2^19 + 1/2^22 + 1/2^24 + 1/2^27 + ... + 1/2^floor(n*x/(x-1)) + ...)
with x/(x-1) = 2.476190476190476206084768146657533224...
RELATED CONSTANT.
If we define the constant z = Sum_{n>=0} 1/2^(n*z),
without using the floor function in the exponents,
then z = A329986 and satisfies 2^z = z/(z-1) where
z = 1.52980838275908436221576075769900951168944...
PROG
(PARI) \\ Set desired precision
\p1000
{a(n) = my(x = 7554425181395669/4503599627370495.) ;
x = 1 + suminf(n=1, 1./2^floor(n*x) ) ; X=x; floor(10^(n-1)*x)%10}
\\ Print the constant
print("Constant A391815 = ", X)
\\ Print the digits
for(n=1, 100, print1(a(n), ", "))
CROSSREFS
KEYWORD
nonn,cons
AUTHOR
Paul D. Hanna, Dec 30 2025
STATUS
approved
