0

After reading this article I tried some examples and it looks like mod $4$ there are only two cases: $S_k\equiv 0$ if $k\equiv 0\lor k\equiv-1$ and $S_k\equiv 1$ otherwise.

For even $i=2m$ we have $(2m)^{2m}=(4m^2)^m=4^m\,m^{2m}\equiv 0\;\mod {4}$,

$(4i+1)^{4i+1}\equiv 1\;\mod{4}$ for the binomial expansion

$(4i-1)^{4i-1}\equiv -1\;\mod{4}$ for the same reason

thus adding together $S_k=1^1+2^2+3^3+4^4+5^5+\ldots$ we get $\mod{4}$ the following $1+0-1+0+1+\ldots$ therefore the property is proved.

Do you think the proof is correct? Any generalization?

Edit. for $k=3+16n$ we have $S_k=\sum _{i=1}^k i^i\equiv 0 \mod 16$

the proof is a bit boring if I don't find a shortcut

Raffaele
  • 26,371
  • Generally, it is dangerous to say "obviously" in mathematics. I think your proof (or at least what you have presented) is correct. For generalisations, you could quickly do this with $\mod n$ for any $n$. – mdave16 Jul 23 '17 at 14:07

1 Answers1

0

The Carmichael function for $4$, $\lambda(4)=2$. This is the least universal exponent order, such that every exponent cycle $\bmod 4$ is length $\lambda(4)=2$ or divides this length.

Conveniently, $\lambda(4)\mid 4$ so we only need to consider numbers up to $4$ to understand the behaviour of your $S_k \bmod 4$:

$1^1 = 1$
$2^2=4 \equiv 0 \bmod 4$
$3^3 \underset{\lambda(4)=2}{\equiv} 3^1 \equiv 3 \bmod 4$
$4^4 \equiv 0 \bmod 4$

Then $5^5\equiv 1^1$ etc. - we can reduce base $\bmod 4$ and exponent $\bmod 2$. Also since $S_4\equiv 1+0+3+0\equiv 0 \bmod 4$, the pattern will repeat on a $4$-cycle:

$$1,1,0,0,1,1,0,0,\ldots$$


For $S_k \bmod 16$, we have $\lambda(16)=4$ and again $\lambda(16)\mid 16$. We also have a special case at the start, since of the positive even integers only $i=2$ does not have $i^i\equiv 0 \bmod 16$. So the first values of $i^i \bmod 16$ look like:

$$1,\color{red}{4},11,0,5,0,7,0,9,0,3,0,13,0,15, 0$$

Then subsequently every batch of $16$ values looks the same except the $\color{red}{4}$ becomes a $0$, giving a batch sum of $0 \bmod 16$.

Therefore $S_k\bmod 16$ looks like:

$$1,5,0,0,5,5,12,12,5,5,8,8,5,5,4,4,5,5,0,0,\ldots$$

with every value $k\ge 18$ having $S_k\equiv S_{k-16}\bmod 16$. And as you can see for $k=3+16n$ we have $S_k\equiv 0 \bmod 16$

Joffan
  • 39,627