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.
%I A372953 #16 Jun 01 2024 06:17:28 %S A372953 2,4,5,8,9,13,16,17,25,29,32,37,41,49,53,61,64,73,81,89,97,101,109, %T A372953 113,121,125,128,137,149,157,169,173,181,193,197,229,233,241,256,257, %U A372953 269,277,281,289,293,313,317,337,349,353,361,373,389,397,401,409,421,433,449,457,461 %N A372953 Orders of finite fields where -1 is a square. %C A372953 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. %C A372953 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. %o A372953 (Python) %o A372953 from itertools import count %o A372953 from msmath.numfuns import primepower %o A372953 def a(start=2,stop=None) : %o A372953 for n in range(start,stop) if stop else count(start): %o A372953 if primepower(n) : %o A372953 if n%4 != 3: yield n %Y A372953 Cf. A000040 (primes), A000961 (prime powers). %Y A372953 Symmetric difference of A000079 (power of 2) and A085759 (prime powers congruent to 1 mod 4). %K A372953 nonn,easy %O A372953 1,1 %A A372953 _Mike Speciner_, May 17 2024