Reciprocity laws

I've been reading about a new type of reciprocity than the usual quadratic reciprocity theorem. Instead of being about square roots mod p it is about divisors of the cyclotomic polynomial.

An easy case of the theorem is that the following are equivalent, for all primes p,qp,q:

The theorem in an easy case

In the I=>II direction we have xp1(modq)x^p \equiv 1 \,(\text{mod}\,q) so xx is either the identity or an order pp element of the group of size q1q-1. That implies that x=1(modq)x = 1 \,(\text{mod}\,q) (so q1p1++1+1=pq | 1^{p-1} + \cdots + 1 + 1 = p hence q=pq = p) or pq1p | q - 1 (hence q=1(modp)q = 1 \,(\text{mod}\,p)).

In the other direction II=>I the q=pq = p we have x=1x = 1 and otherwise we get an element xx of order pp by Cauchy's theorem in group theory and it satisfies the equation.

Example

A nice example of this (taken from the first PDF) is that all prime factors other than 5 of x4+x3+x2+x+1x^4 + x^3 + x^2 + x + 1 end in 1:

? f(x) = x^4 + x^3 + x^2 + x + 1
%1 = (x)->x^4+x^3+x^2+x+1
? factor(f(51))
%2 = 
[  5 1]
[ 41 2]
[821 1]

? factor(f(781))
%3 = 
[       5 1]
[    5641 1]
[13207921 1]

? factor(f(7831))
%4 = 
[          5 1]
[      15551 1]
[48372221411 1]

? factor(f(7231))
%5 = 
[         5 1]
[        11 1]
[        31 1]
[      1061 1]
[1511519461 1]

Connection to quadratic reciprocity

First of all this holds much more generally than just for primes pp, we can use any kk and it's cyclotomic polynomial. The proof for that is in the second PDF.

Second while this is a very elegant theorem, I'm interested in that the cyclotomic reciprocity law can be used to prove quadratic reciprocity. I don't have the proof yet though.