# [seqfan] Sum of repunits and other

Tomasz Ordowski tomaszordowski at gmail.com
Wed Jul 1 11:28:46 CEST 2020

```Hello SeqFans!

Let R(n) = Sum_{k=2..n} (k^n-1)/(k-1). This sequence is not in the OEIS.
3, 20, 140, 1274, 15029, 219456, 3816504, 76928676, 1762344771, ...
I noticed that if p is prime, then R(p) == -1 (mod p). Easy proof.
Such pseudoprimes (composite numbers) are 6, 42, ... More.
Cf. https://oeis.org/A014117  Is 1806 also a pseudoprime?
Primes p such that R(p) == -1 (mod p^2) are 2, 5, 13, ...
Cf. https://oeis.org/A007540  Is p = 563 as well?

I also noticed that if n is odd, then Sum_{k=1..n-1} (k^{n-1}-1)/(k+1) is
integer.
If p is an odd prime, then Sum_{k=1..p-1} (k^{p-1}-1}/(k+1) == 1 (mod p^2).
Conjecture: There are no such pseudoprimes (odd composite numbers).
Primes p such that the Sum == 1 (mod p^3) are 3, 7, 1181, ...
Are A088164 also such primes?  https://oeis.org/A088164

Let S(n) = Sum_{k=1..2n} (k^{2n}-1)/(k+1). This sequence is also not in the
OEIS.
0, 1, 76, 10291, 2904616, 1422873849, 1076262430244, 1164414708797575, ...
Conjecture: For n > 0, S(n) == 1 (mod (2n+1)^2) if and only if 2n+1 is
prime.

Best regards,

Thomas

```