login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A188775
Numbers k such that Sum_{j=1..k} j^j == -1 (mod k).
4
1, 2, 3, 6, 14, 42, 46, 1806, 2185, 4758, 5266, 10895, 24342, 26495, 44063, 52793, 381826, 543026, 547311, 805002
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
Cf. A128981 (sum == 0 (mod n)), A188776 (sum == 1 (mod n)).
Cf. A057245.
Sequence in context: A193215 A007611 A098641 * A015892 A056569 A094468
KEYWORD
nonn,hard,more
AUTHOR
EXTENSIONS
a(12)-a(16) from Joerg Arndt, Apr 10 2011
a(17)-a(20) from Lars Blomberg, May 10 2011
STATUS
approved