OFFSET
1,2
MATHEMATICA
Table[Block[{m = 1, t = Select[Range[2, n - 1], CoprimeQ[#, n] &]}, While[! AllTrue[t, Mod[m n, #] == 1 &], m++]; m n], {n, 20}] (* Michael De Vlieger, Mar 08 2022 *)
PROG
(PARI) isok(m, n) = for (k=2, n-1, if ((gcd(k, n)==1) && ((m % k) !=1), return(0))); return(1);
a(n) = my(m=n); while (!isok(m, n), m+=n); m; \\ Michel Marcus, Mar 08 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Stephen G Penrice, May 30 2000
EXTENSIONS
More terms from Sean A. Irvine, Mar 07 2022
STATUS
approved