OFFSET
1,2
COMMENTS
Numbers k such that A001923(k) == -1 (mod k).
a(21) > 10^7. - Hiroaki Yamanouchi, Aug 25 2015
Numbers k such that k divides A062970(k). - Jianing Song, Feb 03 2019
EXAMPLE
6 is a term because 1^1 + 2^2 + 3^3 + 4^4 + 5^5 + 6^6 = 50069 and 50069 + 1 = 6 * 8345. - Bernard Schott, Feb 03 2019
MAPLE
isA188775 := proc(n) add( modp(k &^ k, n), k=1..n) ; if modp(%, n) = n-1 then true; else false; end if; end proc:
for n from 1 do if isA188775(n) then printf("%d\n", n) ; end if; end do: # R. J. Mathar, Apr 10 2011
MATHEMATICA
Union@Table[If[Mod[Sum[PowerMod[i, i, n], {i, 1, n}], n]==n-1, Print[n]; n], {n, 1, 10000}]
PROG
(PARI)
f(n)=lift(sum(k=1, n, Mod(k, n)^k));
for(n=1, 10^6, if(f(n)==n-1, print1(n, ", "))) \\ Joerg Arndt, Apr 10 2011
(PARI) m=0; for(n=1, 1000, m=m+n^n; if((m+1)%n==0, print1(n, ", "))) \\ Jinyuan Wang, Feb 04 2019
(Python)
sum = 0
for n in range(10000):
sum += n**n
if sum % (n+1) == 0:
print(n+1, end=', ')
# Alex Ratushnyak, May 13 2013
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
José María Grau Ribas, Apr 10 2011
EXTENSIONS
a(12)-a(16) from Joerg Arndt, Apr 10 2011
a(17)-a(20) from Lars Blomberg, May 10 2011
STATUS
approved