Definition
<p>Let <span class="math-container">$W$</span> be the function , defined as <span class="math-container">$W(a,b)=r$</span> </p> <p>given <span class="math-container">$a,b\in \mathbb{Z_+}$</span> and <span class="math-container">$a>1$</span></p> <p>Take <span class="math-container">$m$</span> to be the integer s.t. <span class="math-container">$a^{m+1} \ge b > a^{m}$</span>, i.e. <span class="math-container">$m = \lceil \log{b}/\log{a} \rceil - 1$</span>.</p> <p>Convert number <span class="math-container">$a^{m+1} - b$</span> in base <span class="math-container">$a$</span> and add its digits</p> <p><span class="math-container">$$a^{m+1} - b = (r_{l} r_{l-1} ... r_{1} r_{0})_{a}$$</span></p> <p>Where <span class="math-container">$r=\sum_{i=0}^{l}r_{i}$</span></p>
Example:$W(5,77)=8$
Python programming for calculate $W$ function
n1=5
n2=77
rem_array = []
while n2 != 1:
mod = n2%n1
if mod != 0:
rem = n1-mod
n2 = n2 + rem
rem_array.append(round(rem))
n2=n2/n1
else:
n2 = n2/n1
rem_array.append(0)
print(rem_array[::-1])
print(sum(rem_array))
Define $S(a,m)=1^m+2^m+3^m+...+a^m$
Let $p$ is prime and $z=p+1$
◆ $\eth$ is a function defined as
$$\eth (n) = \sum_{W(z,W(z,S(z,2n)))\ne z \\ \ \ \ 1<z\le2n+2}1$$
There is no such $z>2n+2$ satisfied $W(z,W(z,S(z,2n)))\ne z$ so we just need to check $z$ between $1$ to $2n+2$ proof
Observation table
$$\begin{array}{c | c | c |c | } n & \eth(n) & \pi(n) \\ \hline 1 & 2 & 0 \\ \hline 2 & 3 & 1 \\ \hline 3 & 3 & 2 \\ \hline 5 &4& 3 \\ \hline 9 &4& 4 \\ \hline 10 &5& 4 \\ \hline 50 &15& 15 \\ \hline 100 &26& 25 \\ \hline 200 &44& 46 \\ \hline \end{array}$$
Claim
$$|\eth(n) - \pi (n)|\leq 2$$
Please anyone can create a program to calculate $\eth$ values and Shere your observation table and algorithm. To Examine whether a given claim is possibly going to be true
Example
we want to find $W(6,W(6,S(6,2)))$
First calculate $S(6,2)=1^{2}+2^{2}+...+6^{2}=91$
$\implies W(6,W(6,91))$
Here for calculate $W(6,91)$
$ 6^{3}-91 = 125 = (325)_{6}$
$\implies r = \sum r_{i} = 3+2+5 =10$
$hence W(6,91) = 10$
Again to calculate $W(6,W(6,91))=W(6,10)$
$6^{2}-10 =26 = (42)_{6}$
$\implies r=\sum r_{i} = 4+2 =6$
Hence $W(6,W(6,S(6,2)))=6$
Table For $W(t,W(t,S(t,2)))$ which helps to calculate $\eth(1)$.
$$\begin{array}{c | c | c |c | } t & W(t,S(t,2)) & W(t,W(t,S(t,2))) \\ \hline 2 & 2 & 0 \\ \hline 3^{*} & 3 & 0 \\ \hline 4^{*} & 4 & 0 \\ \hline 5 & 6 & 7 \\ \hline 6^{*} & 10 & 6 \\ \hline 7 &5 & 2 \\ \hline 8^{*} &14& 8 \\ \hline 9 &12& 13 \\ \hline 10 &12& 16 \\ \hline 11 & 15 & 16 \\ \hline 12^{*} & 22 & 12 \\ \hline 13 & 10 & 3 \\ \hline 14^{*} & 26 & 14 \\ \hline 15 & 21 & 22 \\ \hline 16 &20 & 26 \\ \hline 17 &24& 25 \\ \hline 18^{*} &34& 18 \\ \hline 19 &15& 4 \\ \hline 20^{*} &38& 20 \\ \hline 21 &30& 31 \\ \hline \vdots &\vdots & \vdots \\ \hline \end{array}$$
$t^{*} = z $
From table $W(t,W(t,S(t,2)))$ we can calculate $\eth(1)$ by counting $z$ such that $W(z,W(z,S(z,2)))\ne z$. we can observe it's only happens when $z=3$ and $4$ hence $\eth(1)=2$.
related posts:A Special Observation on Prime Numbers and $\pi (n)$