A341436 Numbers k such that k divides Sum_{j=1..k} j^(k+1-j).
1, 5, 16, 208, 688, 784, 2864, 9555, 17776, 81239
Offset: 1
Examples
1^5 + 2^4 + 3^3 + 4^2 + 5^1 = 65 = 5 * 13. So 5 is a term.
Links
- Mathematics Stack Exchange, Is it true that if p != 5 is a prime number then 1^p + 2^(p-1) + ... + (p-1)^2 + p^1 != 0 (mod p)?.
Programs
-
Mathematica
Do[If[Mod[Sum[PowerMod[k, n + 1 - k, n], {k, 1, n}], n] == 0, Print[n]], {n, 1, 3000}] (* Vaclav Kotesovec, Feb 12 2021 *)
-
PARI
isok(n) = sum(k=1, n, Mod(k, n)^(n+1-k))==0;
Comments