The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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)))
A277776_list = list(islice(A277776_gen(), 30)) # Chai Wah Wu, Oct 26 2022
CROSSREFS
Columns k=1-2 give: A082568, A357099.
Last elements of nonempty rows give A277777.
Sequence in context: A282624 A179858 A141501 * A103988 A285204 A086269
KEYWORD
nonn,look,tabf
AUTHOR
Alois P. Heinz, Oct 30 2016
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 3 10:43 EDT 2024. Contains 373060 sequences. (Running on oeis4.)