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.

A269595 Irregular triangle in which n-th row the gives quadratic residues prime(n)- m modulo prime(n), for m from {1, 2, ..., prime(n)-1}, in increasing order.

Original entry on oeis.org

1, 2, 1, 4, 3, 5, 6, 2, 6, 7, 8, 10, 1, 3, 4, 9, 10, 12, 1, 2, 4, 8, 9, 13, 15, 16, 2, 3, 8, 10, 12, 13, 14, 15, 18, 5, 7, 10, 11, 14, 15, 17, 19, 20, 21, 22, 1, 4, 5, 6, 7, 9, 13, 16, 20, 22, 23, 24, 25, 28
Offset: 1

Views

Author

Wolfdieter Lang, Mar 06 2016

Keywords

Comments

The length of row 1 is 1 and of row n, n >= 2, is (prime(n)-1)/2, where prime(n) = A000040(n).

Examples

			The irregular triangle T(n, k) begins (P(n) is here prime(n)):
n, P(n)\k 1  2  3  4  5  6  7  8  9 10 11 12 13 14
1,   2:   1
2,   3:   2
3,   5:   1  4
4,   7:   1  2  4
5,  11:   1  3  4  5  9
6:  13:   1  3  4  9 10 12
7,  17:   1  2  4  8  9 13 15 16
8,  19:   1  4  5  6  7  9 11 16 17
9,  23:   1  2  3  4  6  8  9 12 13 16 18
10, 29:   1  4  5  6  7  9 13 16 20 22 23 24 25 28
...
		

Crossrefs

Programs

  • Mathematica
    t = Table[Select[Range[Prime@ n - 1], JacobiSymbol[#, Prime@ n] == 1 &], {n, 10}]; Table[Prime@ n - t[[n, (Prime@ n - 1)/2 - k + 1]], {n, Length@ t}, {k, (Prime@ n - 1)/2}] /. {} -> 1 // Flatten (* Michael De Vlieger, Mar 31 2016, after Jean-François Alcover at A063987 *)

Formula

For n = 1, prime(1) = 2: 1, and for odd primes n >= 2: the increasing values of m from {1, 2, ..., p-1} with the Legendre symbol (-m/prime(n)) = + 1.
T(n, k) = prime(n) - A063987(n,(prime(n)-1)/2-k+1). k=1..(prime(n)-1)/2, for n >= 2, and T(1, 1) = 1.