A094263 Triangle read by rows: for 1 <= k <= n, a(n, k) = n^k mod k.
0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 2, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 2, 1, 0, 0, 0, 2, 0, 3, 4, 1, 0, 0, 1, 0, 1, 4, 3, 2, 1, 0, 0, 0, 1, 0, 0, 4, 3, 0, 1, 0, 0, 1, 2, 1, 1, 1, 4, 1, 8, 1, 0, 0, 0, 0, 0, 2, 0, 5, 0, 0, 4, 1, 0, 0, 1, 1, 1, 3, 1, 6, 1, 1, 9, 2, 1, 0, 0, 0, 2, 0, 4, 4, 0, 0, 8, 6, 3, 4, 1, 0
Offset: 1
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
Table[PowerMod[n,k,k],{n,20},{k,n}]//Flatten (* Harvey P. Dale, Apr 14 2020 *)
Extensions
Edited and extended by David Wasserman, Jan 24 2007