0
$\begingroup$

How do we use Programming to approximate this limit

Math Research

where enter image description here is the density of enter image description here in enter image description here, enter image description here is the Folner Sequence of enter image description here, enter image description here is an interval with a,b,R, and enter image description here. For more information, click on this link (replace G,X,i,g with A,S,n,a) and click here.

A is countable and dense in R and can be written as the operations and compositions of finite or infinite one-variable functions that, when defined on countable domains dense in R, intersect with the integers.

Example:

enter image description here

There are many Folner Sequence of enter image description here. In general, the most natural, "intuitive" sequence is calculated by restricting the variables of each function by enter image description here.

enter image description here enter image description here

enter image description here can be written similarly to enter image description here except it must be a subset of enter image description here.

Example:

enter image description here

Here was my attempt for approximating enter image description here when fdfg, and enter image description here

(In my code I replaced with A[x_,y_,z_,...] and with F[x_,y_,z_,...], enter image description here with S[x_,y_,z_,...] ) and D with D (I forgot D was a built in function).

Using Mathematica, I tried to list all elements of enter image description here depending on enter image description here and determine which elements in ffs exist in sdf. Then I counted all elements in fdfv and divided it by the total elements in enter image description here.

Unprotect[a, b, p, k, q, g, G, i, s, O, D, X, Y, TT, S]
Remove[a, b, p, k, q, g, G, i, s, O, D, X, Y, TT, S]
A[p_, k_, q_] := p/((2^k)*(2*q + 1))
F[p_, n_] := 
 Table[A[p, k, q], {k, 0, Floor[Log[2, n]]}, {q, 0, Floor[(n - 1)/2]}]
G[p_, n_] := Flatten[F[p, n]]
a = 1
b = 2
i[s_] := Solve[s > a && s < b, p, Integers]
O[n_] := Flatten[Thread[i[G[p, n]]]]
T[l_, n_] := Thread[G[l, n], n]
TT[n_] := DeleteDuplicates[Flatten[T[O[n], n]]]
S[j_, k_] := j^2/k^2
X[n_] = Count[Boole[Resolve[Exists[{j, k}, S[j, k] == TT[n]]]], 1]
Y[n_] = Count[TT[n]]
D[S_] := N[X[S]/Y[S]]
D[100]

Instead I get

{}
1
2
Exists::msgs
Exists::msgs
Exists::msgs
General::stop
0
Solve::nsmet
Count[g[Solve[g[p, n] > 1 && g[p, n] < 2, p, Integers], n]]
Solve::nsmet
0.

Is there a better and faster method to solving my example? How do we generalize this for any enter image description here and gdfg?

$\endgroup$