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!)
A277129 Largest m < n such that 2^m == 2^n (mod n). 0
0, 1, 1, 3, 1, 4, 4, 7, 3, 6, 1, 10, 1, 11, 11, 15, 9, 12, 1, 16, 15, 12, 12, 22, 5, 14, 9, 25, 1, 26, 26, 31, 23, 26, 23, 30, 1, 20, 27, 36, 21, 36, 29, 34, 33, 35, 24, 46, 28, 30, 43, 40, 1, 36, 35, 53, 39, 30, 1, 56, 1, 57, 57, 63, 53, 56, 1, 60, 47, 58, 36, 66, 64, 38, 55, 58, 47, 66, 40, 76, 27, 62, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
If n is odd, then a(n) = n - A002326((n-1)/2).
LINKS
MATHEMATICA
Table[m = n - 1; While[Mod[2^m, n] != Mod[2^n, n], m--]; m, {n, 83}] (* Michael De Vlieger, Oct 02 2016 *)
PROG
(PARI) a(n) = {if(n==0, return(0)); my(pt = valuation(n, 2), odd = n/2^pt, ul = odd-A002326(odd\2)); forstep(i = n-1, ul, -1, if(Mod(2, n)^i==Mod(2, n)^n, return(i)))} \\ David A. Corneth, Oct 01 2016
A002326(n)=if(n<0, 0, znorder(Mod(2, 2*n+1)))
CROSSREFS
Sequence in context: A117374 A202142 A021322 * A036412 A363569 A200027
KEYWORD
nonn
AUTHOR
Thomas Ordowski, Oct 01 2016
EXTENSIONS
More terms from Altug Alkan, Oct 01 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 April 24 17:29 EDT 2024. Contains 371962 sequences. (Running on oeis4.)