Check link for M.O. post https://mathoverflow.net/q/346862/149083
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 it's 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$
Identity$1$
if $W(a,b)=r$ then $b+r\equiv 1($ mod $a-1)$
◆ $S$ is a function defined as
$$S(a,n)=\sum_{i=1}^{a}i^{n}$$
Where $a$ and $n$ are positive integer.
Let $p$ is prime and $p+1=z$
Question
show that
<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>
Example
Let $n=1$ here, choose any $z>4$
Let $z=6$
So $W(6,W(6,S(6,2)))=W(6,W(6,91))=W(6,10)=6$
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))
Proof for, if $p>n+1$ then $p|S(p,n)$
Formula
$$ S(a,n)= \sum_{i=1}^{a} i^{n}=\sum_{b=1}^{n+1} \binom{a}b\sum_{j=0}^{b-1} (-1)^{j}(b-j)^{n}\binom{b-1}j$$
Proof
Let $a=p(prime)>n+1$
We can see, $a$ can be common out from $\sum_{b=1}^{n+1}\binom{a}b\sum_{j=0}^{b-1} ...$
$\implies a|S(a,n)$
Proof for, If $ p|S(p,2n)$ Then $W(z,W(z,S(z,2n)))=(z-1)r+1=pr+1$
Proof
See $S(z,2n)=pr_1+1$
$\implies W(z,W(z,S(z,2n)))$ $\ \ \ by\ identity1$
$=W(z,W(z,pr_1+1))$
$=W(z,pr_2)$
$=pr+1=(z-1)r+1$
For some $r,r_1,r_2\in\mathbb{Z}$
I believe $r$ is always $1$ for all $z>2n+2$, that's my question.
Related questions