OFFSET
1,1
LINKS
Jose María Grau, A. M. Oller-Marcen, and J. Sondow, On the congruence 1^n + 2^n +... + n^n = d (mod n), where d divides n
MATHEMATICA
g[n_] := Mod[Sum[PowerMod[i, n, n], {i, 1, n}], n]; tachar[lis_, num_] := Select[lis, ! IntegerQ[#1/num] &]; primi[{}]={}; primi[lis_] := Join[{lis[[1]]}, primi[tachar[lis, lis[[1]]]]]; primi@Select[Range[500], !g[6*#] == # &]
CROSSREFS
KEYWORD
nonn
AUTHOR
José María Grau Ribas, Sep 24 2013
STATUS
approved