
COMMENTS

A123269(n) = Sum[ i^j^k, {i,1,n}, {j,1,n}, {k,1,n} ] = {1, 28, 7625731729896, ...}. Numbers n that divide A123269(n) are listed in A124391(n) = {1, 2, 3, 4, 6, 7, 8, 9, 11, 12, 14, 16, 18, 20, 21, 22, 23, 24, 27, 28, 31, 32, 33, 36, 40, 42, 43, ...}.


MATHEMATICA

Do[f=Sum[Mod[Sum[Mod[Sum[PowerMod[i, j^k, n^2], {i, 1, n}], n^2], {j, 1, n}], n^2], {k, 1, n}]; If[IntegerQ[f/n^2], Print[n]], {n, 1, 103}]
