cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A060036 Triangular array T read by rows: T(n,k) = k^2 mod n, for k = 1,2,...,n-1, n = 2,3,...

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Mar 17 2001

Keywords

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

Examples

			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
		

Crossrefs

Cf. A048153 (row sums).

Programs

  • 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
  • Mathematica
    Flatten[Table[PowerMod[k,2,n],{n,2,20},{k,n-1}]] (* Harvey P. Dale, Feb 27 2012 *)
  • 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
    

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Mar 20 2001