OFFSET
1,2
COMMENTS
Complement of A229305.
The asymptotic density is in [0.7880, 0.8079].
The numbers k = 1, 2, 6, 42, 1806, 47058, 2214502422, 8490421583559688410706771261086 = A230311 are the only values of k such that the set {n: A031971(k*n) == n (mod k*n)} is nonempty. Its smallest element is n = 1, 1, 1, 1, 1, 5, 5, 39607528021345872635 = A231409. (Comment corrected and expanded by Jonathan Sondow, Dec 10 2013.)
LINKS
Robert Israel, Table of n, a(n) for n = 1..1000
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
MAPLE
filter:= proc(n) local t, k;
t:= add(k &^ (42*n) mod (42*n), k=1..42*n);
t mod (42*n) = n
end proc:
select(filter, [$1..100]); # Robert Israel, Dec 15 2020
MATHEMATICA
g[n_] := Mod[Sum[PowerMod[i, n, n], {i, n}], n]; Select[Range[100], g[42*#] == # &]
CROSSREFS
KEYWORD
nonn
AUTHOR
José María Grau Ribas, Sep 21 2013
STATUS
approved