A060037 Triangular array T read by rows: T(n,k)=k^2 mod n, for k=1,2,...,[n/2], n=2,3,...
1, 1, 1, 0, 1, 4, 1, 4, 3, 1, 4, 2, 1, 4, 1, 0, 1, 4, 0, 7, 1, 4, 9, 6, 5, 1, 4, 9, 5, 3, 1, 4, 9, 4, 1, 0, 1, 4, 9, 3, 12, 10, 1, 4, 9, 2, 11, 8, 7, 1, 4, 9, 1, 10, 6, 4, 1, 4, 9, 0, 9, 4, 1, 0, 1, 4, 9, 16, 8, 2, 15, 13, 1, 4, 9, 16, 7, 0, 13, 10, 9, 1, 4, 9, 16, 6, 17, 11, 7, 5, 1, 4, 9, 16, 5, 16
Offset: 2
Examples
1; 1; 1,0; 1,4; 1,4,3; 1,4,2; ...
Links
- T. D. Noe, Rows n=2..100 of triangle, flattened
Programs
-
Mathematica
Flatten[Table[PowerMod[k,2,n],{n,2,20},{k,Floor[n/2]}]] (* Harvey P. Dale, Mar 05 2012 *)
Extensions
More terms from Larry Reeves (larryr(AT)acm.org), Mar 20 2001