login
A060036
Triangular array T read by rows: T(n,k) = k^2 mod n, for k = 1,2,...,n-1, n = 2,3,...
7
1, 1, 1, 1, 0, 1, 1, 4, 4, 1, 1, 4, 3, 4, 1, 1, 4, 2, 2, 4, 1, 1, 4, 1, 0, 1, 4, 1, 1, 4, 0, 7, 7, 0, 4, 1, 1, 4, 9, 6, 5, 6, 9, 4, 1, 1, 4, 9, 5, 3, 3, 5, 9, 4, 1, 1, 4, 9, 4, 1, 0, 1, 4, 9, 4, 1, 1, 4, 9, 3, 12, 10, 10, 12, 3, 9, 4, 1, 1, 4, 9, 2, 11, 8, 7, 8, 11, 2, 9, 4, 1, 1, 4, 9, 1, 10, 6, 4, 4, 6, 10
OFFSET
2,8
COMMENTS
T(n,k) = A048152(n-1,k), 1 <= k < n; T(2*n-1,n-1) = A123684(n-1) = A225126(n-1). - Reinhard Zumkeller, Apr 29 2013
EXAMPLE
The triangle T(n,k) begins:
n\k 1 2 3 4 5 6 7 8 9 10 11 ...
-------------------------------
2: 1
3: 1 1
4: 1 0 1
5: 1 4 4 1
6: 1 4 3 4 1
7: 1 4 2 2 4 1
6: 1 4 1 0 1 4 1
9: 1 4 0 7 7 0 4 1
10: 1 4 9 6 5 6 9 4 1
11: 1 4 9 5 3 3 5 9 4 1
12: 1 4 9 4 1 0 1 4 9 4 1
... reformatted by - Wolfdieter Lang, Dec 17 2018
MATHEMATICA
Flatten[Table[PowerMod[k, 2, n], {n, 2, 20}, {k, n-1}]] (* Harvey P. Dale, Feb 27 2012 *)
PROG
(PARI) { n=1; for (m=2, 46, for (k=1, m-1, write("b060036.txt", n++, " ", k^2 % m)); ) } \\ Harry J. Smith, Jul 01 2009
(Haskell)
a060036 n k = a060036_tabl !! (n-2) !! (k-1)
a060036_row n = a060036_tabl !! (n-2)
a060036_tabl = map init $ tail a048152_tabl
-- Reinhard Zumkeller, Apr 29 2013
CROSSREFS
Cf. A048153 (row sums).
Sequence in context: A234002 A016496 A143253 * A202024 A319703 A166361
KEYWORD
nonn,tabl,easy,nice
AUTHOR
N. J. A. Sloane, Mar 17 2001
EXTENSIONS
More terms from Larry Reeves (larryr(AT)acm.org), Mar 20 2001
STATUS
approved