This site is supported by donations to The OEIS Foundation.

 Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing. Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A063987 Irregular triangle in which n-th row gives quadratic residues modulo the n-th prime. 20
 1, 1, 1, 4, 1, 2, 4, 1, 3, 4, 5, 9, 1, 3, 4, 9, 10, 12, 1, 2, 4, 8, 9, 13, 15, 16, 1, 4, 5, 6, 7, 9, 11, 16, 17, 1, 2, 3, 4, 6, 8, 9, 12, 13, 16, 18, 1, 4, 5, 6, 7, 9, 13, 16, 20, 22, 23, 24, 25, 28, 1, 2, 4, 5, 7, 8, 9, 10, 14, 16, 18, 19, 20, 25, 28, 1, 3, 4, 7, 9, 10, 11, 12, 16, 21, 25 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,4 COMMENTS For n>=2, row lengths are (prime(n)-1)/2. For example, since 17 is the 7th prime number the length of row 7 is (17 - 1)/2 = 8. - Geoffrey Critzer, Apr 04 2015 LINKS T. D. Noe, Rows n=1..100 of triangle, flattened C. F. Gauss, Vierter Abschnitt. Von den Congruenzen zweiten Grades. Quadratische Reste und Nichtreste. Art. 97, in "Untersuchungen über die höhere Arithmetik", Hrsg. H. Maser, Verlag von Julius Springer, Berlin, 1889. EXAMPLE Mod the 5th prime, 11, the (11-1)/2 = 5 quadratic residues are 1,3,4,5,9 and the 5 non-residues are 2,6,7,8,10. The irregular triangle T(n,k) begins  (Here P(n) is 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:    1 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 ...  reformatted, - Wolfdieter Lang, Mar 06 2016 MAPLE with(numtheory): for n from 1 to 20 do for j from 1 to ithprime(n)-1 do if legendre(j, ithprime(n)) = 1 then printf(`%d, `, j) fi; od: od: MATHEMATICA row[n_] := (p = Prime[n]; Select[ Range[p - 1], JacobiSymbol[#, p] == 1 &]); Flatten[ Table[ row[n], {n, 1, 12}]] (* Jean-François Alcover, Dec 21 2011 *) PROG (PARI) residue(n, m)=local(r); r=0; for(i=0, floor(m/2), if(i^2%m==n, r=1)); r isA063987(n, m)=residue(n, prime(m)) /* Michael B. Porter, May 07 2010 */ (Python) from sympy import jacobi_symbol as J, prime def a(n):     p=prime(n)     return [1] if n==1 else list(filter(lambda i: J(i, p)==1, range(1, p))) for n in range(1, 11): print a(n) # Indranil Ghosh, May 27 2017 CROSSREFS Cf. A063988, A010379 (6th row), A010381 (7th row), A010385 (8th row), A010391 (9th row), A010392 (10th row), A278580 (row 23), A230077. Sequence in context: A100353 A080508 A178141 * A236269 A010126 A021712 Adjacent sequences:  A063984 A063985 A063986 * A063988 A063989 A063990 KEYWORD nonn,tabf,nice,easy,changed AUTHOR Suggested by Gary W. Adamson, Sep 18 2001 EXTENSIONS Edited by Wolfdieter Lang, Mar 06 2016 STATUS approved

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

Last modified December 10 23:13 EST 2019. Contains 329909 sequences. (Running on oeis4.)