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”).

Numbers k such that j^j == j^j^j (mod k) for every j.
0

%I #22 Aug 20 2023 16:56:50

%S 1,2,3,4,6,12

%N Numbers k such that j^j == j^j^j (mod k) for every j.

%C Divisors of 12. For k <= 16, we may compute membership directly (see Mathematica code). For k > 16, we have j = 2 as a counterexample. - _Eric M. Schmidt_, Aug 03 2014

%t h1[mod_] := Table[PowerMod[i, i, mod], {i, 1, mod + LCM[mod*CarmichaelLambda[mod]]}]; h2[mod_] := Table[PowerMod[i, i^i, mod], {i, 1, mod + LCM[mod*CarmichaelLambda[mod]]}]; Union[Table[If[h1[i] == h2[i], Print[i]; i], {i, 1000}]]

%K nonn,fini,full

%O 1,2

%A _José María Grau Ribas_, Jan 23 2012