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!)
A063988 Triangle in which n-th row gives quadratic non-residues modulo the n-th prime. 2
2, 2, 3, 3, 5, 6, 2, 6, 7, 8, 10, 2, 5, 6, 7, 8, 11, 3, 5, 6, 7, 10, 11, 12, 14, 2, 3, 8, 10, 12, 13, 14, 15, 18, 5, 7, 10, 11, 14, 15, 17, 19, 20, 21, 22, 2, 3, 8, 10, 11, 12, 14, 15, 17, 18, 19, 21, 26, 27, 3, 6, 11, 12, 13, 15, 17, 21, 22, 23, 24, 26, 27, 29, 30, 2, 5, 6, 8, 13, 14 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,1
LINKS
EXAMPLE
Mod the 5th prime, 11, the quadratic residues are 1,3,4,5,9 and the non-residues are 2,6,7,8,10.
Triangle begins:
2;
2,3;
3,5,6;
2,6,7,8,10;
...
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_] := Select[p = Prime[n]; Range[p - 1], JacobiSymbol[#, p] == -1 &]; Table[row[n], {n, 2, 12}] // Flatten (* Jean-François Alcover, Oct 17 2012 *)
PROG
(PARI) residue(n, m)={local(r); r=0; for(i=0, floor(m/2), if(i^2%m==n, r=1)); r}
isA063988(n, m)=!residue(n, prime(m)) \\ Michael B. Porter, May 07 2010
(PARI) tabf(nn) = {for(n=1, prime(nn), p = prime(n); for (i=2, p-1, if (kronecker(i, p) == -1, print1(i, ", ")); ); print(); ); } \\ Michel Marcus, Jul 19 2013
(Python)
from sympy import jacobi_symbol as J, prime
def a(n):
p=prime(n)
return [i for i in range(1, p) if J(i, p)==-1]
print([a(n) for n in range(2, 13)]) # Indranil Ghosh, May 27 2017
CROSSREFS
Cf. A063987.
Sequence in context: A166588 A277321 A262365 * A198453 A345162 A316313
KEYWORD
nonn,tabf,nice,easy
AUTHOR
Suggested by Gary W. Adamson, Sep 18 2001
EXTENSIONS
More terms from James A. Sellers, Sep 25 2001
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.)