OFFSET
0,3
COMMENTS
?(x) is Minkowski's question mark function. Note ?(x)-x is odd and has period 1. Finding the maximum of ?(x)-x difficult; fractal local maxima abound. Given that this continued fraction expansion represents the real a, we note the global minimum of ?(x)-x occurs (symmetrically across x=1/2) at 1-a (mod 1). We expect even entries will remain near (if not at) 1 and odd entries will grow very slowly (perhaps not monotonically).
A lookahead algorithm scanning over continued fractions with coefficients <= 20 and lookahead depth 4 returns the fraction [0; 1, 3, 1, 4, 1, 4, 1, 5, 1, 4, 1, 4, 1, 4, 1, 4, ..]. This corresponds to an x value of 0.7928941486060[1], at which point ?(x)-x is equal to 0.1425907067997[2]. - Charlie Neder, Oct 27 2018
If A is the sequence 1,1,1,0,1, B is the sequence A, A, A, 1, A, A, A, and C is the sequence B, B, B, B, B, B, A, then the binary digits of ?(x) after the decimal point begin B, C, C, B, C, C, .... Does there exist a (potentially infinite) set of generating rules for that sequence of digits? - Charlie Neder, May 04 2026
LINKS
Charlie Neder, Table of n, a(n) for n = 0..999
Charlie Neder, Table of n, a(n) for n = 0..343
EXAMPLE
The maximum is attained at x = 0.79289414860618..., whose continued fraction begins [0;1,3,1,4,1,4,1,5,1,4,1,4,1,4,...]. This corresponds to a value of ?(x) whose binary expansion begins 0.1110111101111011111011110111101111..., corresponding to a decimal value of 0.9354848554057... - Charlie Neder, May 05 2026
PROG
(Python)
from itertools import product
def qx(arr): #given continued fraction,
qx = 0
for i in range(1, len(arr)): #generate ?(x)/2
qx += (-1)**(i+1) / 2**sum(arr[:i+1])
ratio = arr[-1]
for i in range(len(arr)-2, -1, -1): #generate x
ratio = arr[i] + 1/ratio
return 2*qx - ratio, ratio #subtract
arr = [0, 1]
for k in range(1, 19):
cap = [0, ()] #current best branch
for tag in product(range(1, 21), repeat=4):
res = qx(arr + list(tag)) #test a branch, record if best
if res[0] > cap[0]: cap = [res[0], tag, res[1]]
print(cap) #print current ?(x)-x, best branch, current x
arr.append(cap[1][0]) #go down the branch
# Charlie Neder, Oct 27 2018
CROSSREFS
KEYWORD
cofr,hard,nonn
AUTHOR
Joseph Biberstine (jrbibers(AT)indiana.edu), Jun 13 2006
EXTENSIONS
More terms from Charlie Neder, May 04 2026
STATUS
approved
