cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A372953 Orders of finite fields where -1 is a square.

Original entry on oeis.org

2, 4, 5, 8, 9, 13, 16, 17, 25, 29, 32, 37, 41, 49, 53, 61, 64, 73, 81, 89, 97, 101, 109, 113, 121, 125, 128, 137, 149, 157, 169, 173, 181, 193, 197, 229, 233, 241, 256, 257, 269, 277, 281, 289, 293, 313, 317, 337, 349, 353, 361, 373, 389, 397, 401, 409, 421, 433, 449, 457, 461
Offset: 1

Views

Author

Mike Speciner, May 17 2024

Keywords

Comments

The sequence comprises the positive powers of 2, the positive powers of primes congruent to 1 mod 4, and the positive even powers of primes congruent to 3 mod 4.
The multiplication group of GF(p^n) is cyclic of order o = p^n-1. For p=2, 1=-1, so 1 is a square root of -1. Otherwise, -1 has order 2 and so any square root of -1 has order 4. So, for there to be a square root of -1, o mod 4 must be 0, i.e. p^n mod 4 = 1. Then if g is a generator of the group, g^(o/4) is a square root of -1. p^n mod 4 = 1 if and only if p mod 4 = 1 or p mod 4 = 3 and n is even.

Crossrefs

Cf. A000040 (primes), A000961 (prime powers).
Symmetric difference of A000079 (power of 2) and A085759 (prime powers congruent to 1 mod 4).

Programs

  • Python
    from itertools import count
    from msmath.numfuns import primepower
    def a(start=2,stop=None) :
      for n in range(start,stop) if stop else count(start):
        if primepower(n) :
          if n%4 != 3: yield n