login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A212157
Array T(n,k) = k^((prime(n)-1)/2) (mod prime(n)), n >= 2, k=1, 2, ... , prime(n)-1; T(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, -1, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1
OFFSET
1
COMMENTS
The row lengths sequence is A006093(n) = prime(n) - 1, n>=1.
prime(n) = A000040(n), n>=1. q(n):=(prime(n)-1)/2 = A005097(n), n>=2.
Due to the little Fermat theorem T(n,k)^2 == +1 (mod prime(n)). For n>=2 there are the two incongruent solutions + 1 and -1 of y^2 === +1 (mod prime (n)). k^q(n) = + 1 (mod prime(n)) has for n>=2 at most q(n) incongruent solutions, similarly for k^q(n) = -1 (mod prime(n)). All-together there are prime(n)-1 = 2*q(n) incongruent solutions of k^(2*q(n)) == +1 (mod prime(n)) (little Fermat for k=1,..,p-1), hence each row of this array has only +1 and -1 values, and both values appear (prime(n)-1)/2 times.
See, e.g., the first part of the Holsztyński Włodzimierz blog given in the link.
FORMULA
T(n,k) = k^((prime(n)-1)/2) (mod prime(n)) for n >= 2 and k=1,2,...,prime(n)-1; T(1,1) = +1.
EXAMPLE
n, p(n)\k 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
1, 2 +1
2, 3 +1 -1
3, 5 +1 -1 -1 +1
4, 7 +1 +1 -1 +1 -1 -1
5, 11 +1 -1 +1 +1 +1 -1 -1 -1 +1 -1
6, 13 +1 -1 +1 +1 -1 -1 -1 -1 +1 +1 -1 +1
7, 17 +1 +1 -1 +1 -1 -1 -1 +1 +1 -1 -1 -1 +1 -1 +1 +1
8, 19 +1 -1 -1 +1 +1 +1 +1 -1 +1 -1 +1 -1 -1 -1 -1 +1 +1 -1
...
MATHEMATICA
Table[Table[PowerMod[a, (p - 1)/2, p], {a, 1, p - 1}] /. _?(# > 1 &) -> -1, {p, Prime[Range[10]]}] // Grid (* Geoffrey Critzer, Jan 04 2015 *)
CROSSREFS
Cf. A097343 (this sequence with 0's ending each row).
Sequence in context: A121238 A321753 A186032 * A131554 A160357 A186039
KEYWORD
sign,tabf
AUTHOR
Wolfdieter Lang, May 04 2012
STATUS
approved