OFFSET
1,1
COMMENTS
From Bernard Schott, Jan 28 2021: (Start)
a(n) > 0 when n <> 3.
Proof: When n = 1, 2, 4 then a(n) = 20, 4, 8; then, following Goldbach conjecture when p = prime(n) >= 11 with p-1 = p1 + p2, then sigma(p1*p2) = 1+p1+p2+p1*p2 == 1+p1+p2 = p (mod p1*p2); hence, for each n>= 5, a(n) exists and a(n) <= p1*p2 (see examples).
Now, when n = 3, no k is known such that sigma(k) == 5 (mod k)? (End)
LINKS
Michel Marcus, Table of n, a(n) for n = 1..4000
EXAMPLE
For prime(5) = 11, 11-1=3+7 with 3*7 = 21, so a(5) <= 21 and a(5) = 21.
For prime(6) = 13, 13-1=5+7 with 5*7 = 35, so a(6) <= 35 but sigma(27) = 40 == 13 (mod 27), hence a(6)=27.
PROG
(PARI) f(n) = sigma(n) % n; \\ A054024
a(n) = if (n==3, return (-1)); my(k=1, p=prime(n)); while (f(k) != p, k++); k;
CROSSREFS
KEYWORD
sign
AUTHOR
Michel Marcus, Jan 28 2021
STATUS
approved