OFFSET
1,1
EXAMPLE
Array starts
1093, 2, 1093, 2, 1093, 2, 1093, 2, 1093, 2
11, 71, 3, 11, 71, 3, 11, 71, 3, 11
2, 1093, 2, 1093, 2, 1093, 2, 1093, 2, 1093
5, 2, 1093, 2, 1093, 2, 1093, 2, 1093, 2
71, 3, 11, 71, 3, 11, 71, 3, 11, 71
2, 1093, 2, 1093, 2, 1093, 2, 1093, 2, 1093
2, 1093, 2, 1093, 2, 1093, 2, 1093, 2, 1093
3, 11, 71, 3, 11, 71, 3, 11, 71, 3
13, 2, 1093, 2, 1093, 2, 1093, 2, 1093, 2
2, 1093, 2, 1093, 2, 1093, 2, 1093, 2, 1093
MATHEMATICA
f[n_] := Block[{p = 2}, While[! Divisible[n^(p - 1) - 1, p^2], p = NextPrime@ p]; p]; T[n_, k_] := T[n, k] = If[k == 1, f@ Prime@ n, f@ T[n, k - 1]]; Table[Function[n, T[n, k]][m - k + 1], {m, 12}, {k, m, 1, -1}] // Flatten (* Michael De Vlieger, Jun 06 2017 *)
PROG
(PARI) a039951(n) = forprime(p=1, , if(Mod(n, p^2)^(p-1)==1, return(p)))
table(rows, cols) = forprime(p=1, prime(rows), my(i=0, w=a039951(p)); while(i < cols, print1(w, ", "); w=a039951(w); i++); print(""))
table(10, 10) \\ print initial 10 rows and 10 columns of table
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Felix Fröhlich, Jun 05 2017
EXTENSIONS
More terms from Michael De Vlieger, Jun 06 2017
STATUS
approved