login
Numbers k such that 10^(k-1) == 1 (mod k).
2

%I #17 Jul 25 2021 02:39:45

%S 1,3,7,9,11,13,17,19,23,29,31,33,37,41,43,47,53,59,61,67,71,73,79,83,

%T 89,91,97,99,101,103,107,109,113,127,131,137,139,149,151,157,163,167,

%U 173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,259,263

%N Numbers k such that 10^(k-1) == 1 (mod k).

%C Superset of the full reptend primes.

%H Amiram Eldar, <a href="/A104381/b104381.txt">Table of n, a(n) for n = 1..10000</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/FullReptendPrime.html">Full Reptend Prime</a>.

%t Select[ Range[270], Mod[ PowerMod[10, # - 1, # ] - 1, # ] == 0 &] (* _Robert G. Wilson v_, Mar 16 2005 *)

%t Join[{1},Select[Range[300],PowerMod[10,#-1,#]==1&]] (* _Harvey P. Dale_, Oct 24 2016 *)

%o (PARI) isok(n) = lift(Mod(10, n)^(n-1)) == 1; \\ _Michel Marcus_, Sep 25 2014

%Y Cf. A005939.

%K nonn

%O 1,2

%A _Eric W. Weisstein_, Mar 03 2005