A322120 a(n) is the smallest composite k such that n^(k-1) == 1 (mod (n^2-1)*k).
341, 91, 91, 217, 481, 25, 65, 91, 91, 133, 133, 85, 781, 341, 91, 91, 25, 49, 671, 221, 169, 91, 553, 217, 133, 121, 361, 341, 49, 49, 25, 545, 703, 341, 403, 217, 85, 341, 121, 671, 529, 25, 703, 133, 133, 65, 481, 247, 793, 451, 671, 703, 361, 697, 403, 25
Offset: 2
Keywords
Programs
-
Mathematica
a[n_] := Module[{k=4}, While[PrimeQ[k] || !Divisible[n^(k-1)-1, (n^2-1)k], k++]; k]; Array[a, 100, 2] (* Amiram Eldar, Nov 27 2018 *)
-
PARI
a(n) = {forcomposite(k=1, ,if (Mod(n, (n^2-1)*k)^(k-1) == 1, return (k)););} \\ Michel Marcus, Nov 28 2018
Extensions
More terms from Amiram Eldar, Nov 27 2018
Comments