|
|
A277777
|
|
Largest nontrivial square root of unity modulo the n-th positive integer that does not have a primitive root (A033949).
|
|
3
|
|
|
5, 7, 11, 9, 11, 13, 19, 15, 19, 17, 23, 29, 19, 25, 31, 29, 23, 26, 41, 35, 27, 34, 43, 37, 49, 55, 33, 51, 43, 35, 47, 41, 55, 49, 39, 43, 53, 71, 71, 69, 59, 67, 71, 64, 47, 61, 56, 79, 89, 51, 67, 79, 76, 55, 89, 73, 97, 77, 91, 59, 64, 69, 109, 83, 63, 71
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
|
|
PROG
|
(Python)
from gmpy2 import *
def f(n):
for k in range(n - 2, 0, -1):
if pow(k, 2, n) == 1:
return k
return [j for j in [f(k) for k in range(3, L + 1)] if j > 1] # Darío Clavijo, Oct 15 2022
(Python)
from itertools import count, islice
from sympy.ntheory import sqrt_mod_iter
def A277777_gen(): # generator of terms
for n in count(3):
if (m:=max(filter(lambda k:k<n-1, sqrt_mod_iter(1, n)))) > 1:
yield m
|
|
CROSSREFS
|
Last elements of nonempty rows of A277776.
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|