login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A070667 Smallest m in range 2..n-1 such that m^2 == 1 mod n, or 1 if no such number exists. 22
1, 1, 2, 3, 4, 5, 6, 3, 8, 9, 10, 5, 12, 13, 4, 7, 16, 17, 18, 9, 8, 21, 22, 5, 24, 25, 26, 13, 28, 11, 30, 15, 10, 33, 6, 17, 36, 37, 14, 9, 40, 13, 42, 21, 19, 45, 46, 7, 48, 49, 16, 25, 52, 53, 21, 13, 20, 57, 58, 11, 60, 61, 8, 31, 14, 23, 66, 33, 22, 29 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

If n has a primitive root (i.e. if n is in A033948(n)) then a(n)=n-1, if not (i.e. if n is in A033949(n)), a(n)<n-1. E.g.: if n is of the form 4*A000961(m), then a(n)=n/2-1. Questions : for which n does the equation A070667(x)=x-n have at least one solution, does always A070667(x)=x-p have at least one solution when p is prime =>5? - Benoit Cloitre, May 12 2002

LINKS

Alois P. Heinz, Table of n, a(n) for n = 1..10000

MAPLE

a:= proc(n) local k; for k from 2 do if 1=k*k mod n

      then return k elif k>=n then return 1 fi od

    end:

seq(a(n), n=1..100);  # Alois P. Heinz, Oct 30 2016

MATHEMATICA

Join[{1, 1}, Flatten[Table[Select[Range[2, n-1], PowerMod[#, 2, n]==1&, 1], {n, 70}]]] (* Harvey P. Dale, May 01 2012 *)

CROSSREFS

Cf. A033948, A033949, A000961.

Sequence in context: A070675 A096894 A097751 * A245349 A122416 A307784

Adjacent sequences:  A070664 A070665 A070666 * A070668 A070669 A070670

KEYWORD

nonn

AUTHOR

N. J. A. Sloane, May 08 2002

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 21 13:24 EDT 2019. Contains 328299 sequences. (Running on oeis4.)