Update
Please check recently posted on M.O
$\eth(n)$ is a little algorithm I made, which may appear to be quite complex, so I will start with an example middle of the post. Questions are at the end of the post.
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>Let's given <span class="math-container">$a,b\in \mathbb{N}$</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>Arrange as: <span class="math-container">$$a^{m+1} - b$$</span> <span class="math-container">$$ = r_{l} a^l + r_{l-1} a^{l-1}+... + r_1 a^1 + r_0 a^0 $$</span> <span class="math-container">$$=(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>
●We can prove easily
$W(a,b)=r$ iff $b+r\equiv 1($ mod $a-1)$
●Note $W(a,0)=$ not define
Now here $n \in \mathbb{N}$
◆ $S$ is a function defined as
$$S(a,n)=\sum_{i=1}^{a}i^{n}$$
Let's $p$ is prime and $p+1=z$
◆ $\eth$ is a function defined as
$$\eth (n) = \sum_{W(z,W(z,S(z,2n)))\ne z}1$$
● I strongly observed
<p>If <span class="math-container">$ z>2n+2$</span> Then <span class="math-container">$W(z,W(z,S(z,2n)))=z$</span></p> <p>Hence I conclude</p> <p>•<span class="math-container">$$\eth(n)\leq \pi (2n+1)$$</span></p> <p>•<span class="math-container">$$\eth(n) \approx \pi (n)$$</span></p> <p>•<span class="math-container">$$|\eth(n) - \pi (n)|\leq 2$$</span></p>
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}$$
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 $
◆ $\chi$ is function defined as
$$\chi(n)=\sum_{p \nmid S(p,2n)}1=\sum_{p-1|2n}1$$
And $ n \in \mathbb{N}$
$\implies \eth (n)\geq \chi(n)$
Question
<ul> <li><p>What is formula for <span class="math-container">$\eth(n)$</span>?</p></li> <li><p>Can we prove above observation ?</p></li> </ul>
You can check by using below program
'''python
n1= 2
o = 1
while n1 < 300:
m = 2
print("\n n1=",n1)
#print("m=",m)
num=n1
sum_num = 0
for i in range(1, num+1):
sum_num += i**(m)
n2 = (sum_num)
#print("$n1^2m=",n2)
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],sum(rem_array))
#print(sum(rem_array))
n2 = sum(rem_array)
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)
#print(rem_array[::-1],sum(rem_array))
if(n1 == sum(rem_array)):
print("W(",n1,",W(",n1,",S(",n1,",m)))=",n1)
#else:
#print("not ok")
n1 += o
'''