OFFSET
1,2
COMMENTS
For all k, 2^k, 10^k, 2 * 3^k and 10 * 3^k are in the sequence.
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..10000
EXAMPLE
11^5 - 1 = 161050, which is divisible by 5, so 5 is in the sequence.
11^6 - 1 = 1771560, which is divisible by 6, so 6 is in the sequence.
11^7 = 19487171 = 4 modulo 7, so 7 is not in the sequence.
MATHEMATICA
Join[{1}, Select[Range[500], PowerMod[11, #, #] == 1 &]] (* Robert Price, Apr 04 2020 *)
PROG
(PARI) isok(n) = Mod(11, n)^n == Mod(1, n); \\ Michel Marcus, May 06 2016
(Scala) def powerMod(a: Int, b: Int, m: Int): Int = b match { case 1 => a % m; case n => a * powerMod(a, n - 1, m) % m }
List(1) ++: (2 to 500).filter(k => powerMod(11, k, k) == 1) // Alonso del Arte, Apr 04 2020
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Benoit Cloitre, Mar 05 2002
STATUS
approved