login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A233558 Triangle read by rows: T(n,k) = real part mod n of (n + ki)^2, where k=1..n-1 and i is the imaginary unit. 0
1, 2, 2, 3, 0, 3, 4, 1, 1, 4, 5, 2, 3, 2, 5, 6, 3, 5, 5, 3, 6, 7, 4, 7, 0, 7, 4, 7, 8, 5, 0, 2, 2, 0, 5, 8, 9, 6, 1, 4, 5, 4, 1, 6, 9, 10, 7, 2, 6, 8, 8, 6, 2, 7, 10, 11, 8, 3, 8, 11, 0, 11, 8, 3, 8, 11, 12, 9, 4, 10, 1, 3, 3, 1, 10, 4, 9, 12, 13, 10, 5, 12, 3, 6, 7, 6, 3, 12, 5, 10, 13, 14, 11, 6, 14, 5, 9, 11, 11, 9, 5, 14 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
2,2
COMMENTS
For prime n, if n == 1 (mod 4), sequence gives quadratic residues of n, and if n == 3 (mod 4) the sequence gives non-quadratic residues.
Check: The sixth row, the row for 7 (of the form 4k+3): {6, 3, 5, 5, 3, 6} contains only quadratic non-residues (3, 5 and 6).
Also, on the tenth row, for 11 (of the form 4k+3 also) it is also true: {10, 7, 2, 6, 8, 8, 6, 2, 7, 10}, as 2, 6, 7, 8 and 10 are exactly the quadratic non-residues of 11.
Also, on the twelfth row, for n=13 (of the form 4k+1), it is true that all its quadratic residues are listed: {12, 9, 4, 10, 1, 3, 3, 1, 10, 4, 9, 12}.
LINKS
FORMULA
As a table array with offset 1, T(n, k) = (n*k) % (n+k). - Michel Marcus, Nov 28 2019
EXAMPLE
Triangle starts:
1;
2, 2;
3, 0, 3;
4, 1, 1, 4;
5, 2, 3, 2, 5;
6, 3, 5, 5, 3, 6;
PROG
(JavaScript)
function cNumber(x, y) {
return [x, y];
}
function cMult(a, b) {
return [a[0]*b[0]-a[1]*b[1], a[0]*b[1]+a[1]*b[0]];
}
for (i=1; i<20; i++)
for (j=1; j<i; j++) {
ij=cNumber(i, j);
ij2=cMult(ij, ij);
ijm=ij2[0]%ij[0];
document.write(ijm+", ");
}
(PARI) T(n, k) = real((n+k*I)^2) % n;
tabl(nn) = for(n=2, nn, for(k=1, n-1, print1(T(n, k), ", "); ); print(); ) \\ Michel Marcus, Jun 25 2018
CROSSREFS
Sequence in context: A297114 A318448 A103516 * A319929 A129234 A213081
KEYWORD
nonn,tabl
AUTHOR
Jon Perry, Dec 13 2013
EXTENSIONS
Edited by Jon E. Schoenfield, Jun 30 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 16:52 EDT 2024. Contains 371794 sequences. (Running on oeis4.)