This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A097343 Triangle read by rows in which row n gives Legendre symbol (k,p) for 0
 1, -1, 0, 1, -1, -1, 1, 0, 1, 1, -1, 1, -1, -1, 0, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1, 0, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 0, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 0, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, 1, 1, -1, 0, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, -1, 0, 1, -1, -1, 1, 1, 1, 1 (list; graph; refs; listen; history; text; internal format)
 OFFSET 2,1 COMMENTS Row sums = 0. (p,k)==k^((p-1)/2) (mod p). For example, row n=4 of the triangle (for the 4th prime p = 7) reads: 1,1,-1,1,-1,-1,0 because 1^3==1, 2^3==1, 3^3==-1, 4^3==1, 5^3==-1, 6^3==-1, 7^3==0 (mod 7). - Geoffrey Critzer, Apr 18 2015 LINKS Reinhard Zumkeller, Rows n = 2..75 of triangle, flattened Haskell for Math, Number Theory Fundamentals Wikipedia, Legendre symbol FORMULA (p, p)=0, all others are +- 1. EXAMPLE 1,-1,0 ; # A102283 1,-1,-1,1,0; # A080891 1,1,-1,1,-1,-1,0; # A175629 1,-1,1,1,1,-1,-1,-1,1,-1,0; # A011582 MAPLE with(numtheory): T:= n-> (p-> seq(jacobi(k, p), k=1..p))(ithprime(n)): seq(T(n), n=2..15);  # Alois P. Heinz, Apr 19 2015 MATHEMATICA Flatten[ Table[ JacobiSymbol[ Range[ Prime[n]], Prime[n]], {n, 2, 8}]] PROG (Haskell) a097343 n k = a097343_tabf !! (n-2) !! (k-1) a097343_row n = a097343_tabf !! (n-2) a097343_tabf =    map (\p -> map (flip legendreSymbol p) [1..p]) \$ tail a000040_list legendreSymbol a p = if a' == 0 then 0 else twoSymbol * oddSymbol where    a' = a `mod` p    (s, q) = a' `splitWith` 2    twoSymbol = if (p `mod` 8) `elem` [1, 7] || even s then 1 else -1    oddSymbol = if q == 1 then 1 else qrMultiplier * legendreSymbol p q    qrMultiplier = if p `mod` 4 == 3 && q `mod` 4 == 3 then -1 else 1    splitWith n p = spw 0 n where       spw s t = if m > 0 then (s, t) else spw (s + 1) t'                 where (t', m) = divMod t p -- See link.  Reinhard Zumkeller, Feb 02 2014 CROSSREFS See A226520 for another version. Cf. A068717. Sequence in context: A105368 A138019 A179850 * A040051 A108788 A103583 Adjacent sequences:  A097340 A097341 A097342 * A097344 A097345 A097346 KEYWORD sign,tabf AUTHOR Robert G. Wilson v, Aug 02 2004 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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified October 18 07:58 EDT 2018. Contains 316307 sequences. (Running on oeis4.)