OFFSET
1,2
COMMENTS
From Robert Israel, Aug 09 2016: (Start)
a(n) <= A038700(n) if n >= 4, since sigma(k^k) == 0 (mod n) if k is an odd prime == -1 (mod n).
If n is prime and n-2 is squarefree, then a(n) <= n-2 since sigma((n-2)^(n-2)) == 0 (mod n).
Conjecture: a(n) <= n-2 for all n > 15, but a(n) = n-2 for infinitely many n. (End)
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(11) = 19 because sigma(19^19) is divisible by 11.
MAPLE
N:= 200: # to get a(1)..a(N)
S:= {$1..N}:
for k from 1 while S <> {} do
v:= numtheory:-sigma(k^k);
F:= select(t -> v mod t = 0, S);
for n in F do A[n]:= k od:
S:= S minus F;
od:
seq(A[n], n=1..N); # Robert Israel, Aug 09 2016
PROG
(PARI) a(n) = {my(k=1); while(sigma(k^k) % n != 0, k++); k; }
CROSSREFS
KEYWORD
nonn
AUTHOR
Altug Alkan, Aug 07 2016
STATUS
approved