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!)
A228179 Irregular table where the n-th row consists of the square roots of 1 in Z_n. 4
1, 1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 3, 5, 7, 1, 8, 1, 9, 1, 10, 1, 5, 7, 11, 1, 12, 1, 13, 1, 4, 11, 14, 1, 7, 9, 15, 1, 16, 1, 17, 1, 18, 1, 9, 11, 19, 1, 8, 13, 20, 1, 21, 1, 22, 1, 5, 7, 11, 13, 17, 19, 23, 1, 24, 1, 25, 1, 26, 1, 13, 15, 27, 1, 28, 1, 11 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,3
COMMENTS
Each 1 starts a new row.
This is a subsequence of A020652.
Row n has A060594(n) entries.
Each row forms a subgroup of the multiplicative group of units of Z_n.
LINKS
EXAMPLE
The table starts out as follows:
1
1 2
1 3
1 4
1 5
1 6
1 3 5 7
1 8
1 9
1 10
1 5 7 11
...
MAPLE
T:= n-> seq(`if`(k&^2 mod n=1, k, NULL), k=1..n-1):
seq(T(n), n=2..50); # Alois P. Heinz, Aug 20 2013
MATHEMATICA
Flatten[Table[Position[Mod[Range[n]^2, n], 1], {n, 2, 50}]] (* T. D. Noe, Aug 20 2013 *)
PROG
(Sage) [[i for i in [1..k-1] if (i*i).mod(k)==1] for k in [2..n]] #changing n gives you the table up to the n-th row.
(Python)
from itertools import chain, count, islice
from sympy.ntheory import sqrt_mod_iter
def A228179_gen(): # generator of terms
return chain.from_iterable((sorted(sqrt_mod_iter(1, n)) for n in count(2)))
A228179_list = list(islice(A228179_gen(), 30)) # Chai Wah Wu, Oct 26 2022
CROSSREFS
Cf. A070667 (second column), A358016 (second-last column).
Cf. A277776 (nontrivial square roots of 1).
Sequence in context: A329534 A317746 A364449 * A322313 A322315 A319338
KEYWORD
nonn,easy,tabf
AUTHOR
Tom Edgar, Aug 20 2013
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 April 24 18:17 EDT 2024. Contains 371962 sequences. (Running on oeis4.)