View Single Post
Old 2011-05-19, 13:39   #3
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26×131 Posts
Default

Quote:
Originally Posted by allasc View Post
Post of Russia
http://dxdy.ru/post447534.html#p447534

sequence in the OEIS
A190213

Numbers n such that a==0(mod k) and b==0(mod k), where k=2^n-1, m=(2^n-1)*(n-1)-n+2, x=m*(2^n-1), 2^(x-1)==(a+1)(mod x), m^(x-1)==(b+1)(mod x)

1, 3, 4, 5, 7, 13, 17, 19, 31, 61, 89, 107, 127, 521, 607, 1279, 2203, 2281, 3217

EXAMPLE
n=3
k=2^3-1=7
m=(2^3-1)*(3-1)-3+2=13
x=m*(2^n-1)=13*7=91
2^(x-1)==(a+1)(mod x);2^90==(63+1)(mod 91), a=63
m^(x-1)==(b+1)(mod x);13^90==(77+1)(mod 91), b=77

test conditions
a==0(mod k), 63==0(mod 7)
b==0(mod k), 77==0(mod 7)
----------------------------------------

All odd numbers are of Mersenne exponents: primes n such that 2^n - 1 is prime A000043

4 is the only even number
why not 2? I do not know .....
Code:
(10:34)>test(n)= k=2^n-1;m=(2^n-1)*(n-1)-n+2;x=m*(2^n-1);a=((2^(x-1))%x)-1;b=((2^(x-1))%x)-1;if(a%k==0 && b%k==0,print(n))
%167 = (n)->k=2^n-1;m=(2^n-1)*(n-1)-n+2;x=m*(2^n-1);a=((2^(x-1))%x)-1;b=((2^(x-1))%x)-1;if(a%k==0&&b%k==0,print(n))
(10:36)>for(n=1,100,test(n))
1
2
3
4
5
7
9
11
  *** _^_: length (lg) overflow
science_man_88 is offline   Reply With Quote