|
|
A277776
|
|
Triangle T(n,k) in which the n-th row contains the increasing list of nontrivial square roots of unity mod n; n>=1.
|
|
5
|
|
|
3, 5, 5, 7, 4, 11, 7, 9, 9, 11, 8, 13, 5, 7, 11, 13, 17, 19, 13, 15, 11, 19, 15, 17, 10, 23, 6, 29, 17, 19, 14, 25, 9, 11, 19, 21, 29, 31, 13, 29, 21, 23, 19, 26, 7, 17, 23, 25, 31, 41, 16, 35, 25, 27, 21, 34, 13, 15, 27, 29, 41, 43, 20, 37, 11, 19, 29, 31, 41
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Rows with indices n in A033948 (or with A046144(n)=0) are empty. Indices of nonempty rows are given by A033949.
This is A228179 without the trivial square roots {1, n-1}.
The number of terms in each nonempty row n is even: A060594(n)-2.
|
|
LINKS
|
|
|
EXAMPLE
|
Row n=8 contains 3 and 5 because 3*3 = 9 == 1 mod 8 and 5*5 = 25 == 1 mod 8.
Triangle T(n,k) begins:
08 : 3, 5;
12 : 5, 7;
15 : 4, 11;
16 : 7, 9;
20 : 9, 11;
21 : 8, 13;
24 : 5, 7, 11, 13, 17, 19;
28 : 13, 15;
30 : 11, 19;
|
|
MAPLE
|
T:= n-> seq(`if`(i*i mod n=1, i, [][]), i=2..n-2):
seq(T(n), n=1..100);
# second Maple program:
T:= n-> ({numtheory[rootsunity](2, n)} minus {1, n-1})[]:
seq(T(n), n=1..100);
|
|
MATHEMATICA
|
T[n_] := Table[If[Mod[i^2, n] == 1, i, Nothing], {i, 2, n-2}];
Select[Array[T, 100], # != {}&] // Flatten (* Jean-François Alcover, Jun 18 2018, from first Maple program *)
|
|
PROG
|
(Python)
from itertools import chain, count, islice
from sympy.ntheory import sqrt_mod_iter
def A277776_gen(): # generator of terms
return chain.from_iterable((sorted(filter(lambda m:1<m<n-1, sqrt_mod_iter(1, n))) for n in count(2)))
|
|
CROSSREFS
|
Last elements of nonempty rows give A277777.
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|