OFFSET
1,2
REFERENCES
J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 303, p. 76, Ellipses, Paris 2008.
LINKS
Hugo Pfoertner, Table of n, a(n) for n = 1..250
EXAMPLE
3 divides 10^4 - 1 = 3^2 * 11 * 101.
9 divides 10^10 - 1 = 3^2 * 11 * 41 * 271 * 9091.
11 divides 10^12 - 1 = 3^3 * 7 * 11 * 13 * 37 * 101 * 9901.
33 divides 10^34 - 1 = 3^2 * 11 * 103 * 4013 * 2071723 * 5363222357 * 21993833369.
MAPLE
with(numtheory):for n from 1 to 50000 do: x:= 10^(n+1) - 1: y:=irem(x, n): if y=0 then print (n):else fi:od:
MATHEMATICA
Select[Flatten[10*#-{9, 7, 3, 1} & /@ Range@10000],
Mod[10^(1+#)-1, #]==0 &] (* Hans Rudolf Widmer, Oct 28 2023 *)
PROG
(PARI) isok(k) = Mod(10, k)^(k+1) == 1; \\ Michel Marcus, Jun 02 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Mar 04 2010
STATUS
approved