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 A277777 #26 Oct 26 2022 13:12:24 %S A277777 5,7,11,9,11,13,19,15,19,17,23,29,19,25,31,29,23,26,41,35,27,34,43,37, %T A277777 49,55,33,51,43,35,47,41,55,49,39,43,53,71,71,69,59,67,71,64,47,61,56, %U A277777 79,89,51,67,79,76,55,89,73,97,77,91,59,64,69,109,83,63,71 %N A277777 Largest nontrivial square root of unity modulo the n-th positive integer that does not have a primitive root (A033949). %H A277777 Alois P. Heinz, <a href="/A277777/b277777.txt">Table of n, a(n) for n = 1..10000</a> %H A277777 Wikipedia, <a href="https://en.wikipedia.org/wiki/Root_of_unity_modulo_n">Root of unity modulo n</a> %F A277777 a(n) = A033949(n) - A082568(n). %o A277777 (Python) %o A277777 from gmpy2 import * %o A277777 def f(n): %o A277777 for k in range(n - 2, 0, -1): %o A277777 if pow(k, 2, n) == 1: %o A277777 return k %o A277777 def A277777(L): %o A277777 return [j for j in [f(k) for k in range(3, L + 1)] if j > 1] # _DarĂo Clavijo_, Oct 15 2022 %o A277777 (Python) %o A277777 from itertools import count, islice %o A277777 from sympy.ntheory import sqrt_mod_iter %o A277777 def A277777_gen(): # generator of terms %o A277777 for n in count(3): %o A277777 if (m:=max(filter(lambda k:k<n-1,sqrt_mod_iter(1,n)))) > 1: %o A277777 yield m %o A277777 A277777_list = list(islice(A277777_gen(),30)) # _Chai Wah Wu_, Oct 26 2022 %Y A277777 Last elements of nonempty rows of A277776. %Y A277777 Cf. A033948, A033949, A082568. %K A277777 nonn,look %O A277777 1,1 %A A277777 _Alois P. Heinz_, Oct 30 2016