login
A192324
Sequence of numbers formed as remainder of Mersenne numbers divided by primes.
0
1, 0, 2, 1, 9, 11, 8, 8, 5, 8, 1, 25, 32, 0, 8, 27, 32, 26, 12, 47, 7, 35, 46, 3, 94, 19, 75, 61, 22, 3, 7, 116, 67, 24, 137, 63, 149, 42, 60, 9, 71, 155, 39, 11, 72, 50, 47, 40, 23, 25, 70, 47, 31, 15, 127, 172, 73, 109, 117, 58, 29, 246, 201, 207, 283, 52, 127, 31, 138, 55, 284, 23
OFFSET
1,3
COMMENTS
Exponent of Mersenne number formula does not have to be a prime.
FORMULA
a(n) = mod (mersenne(n) / prime(n))
where mersenne(n) returns n-th mersenne number and, correspondingly, prime(n) returns n-th prime number.
EXAMPLE
a(1) = mod(mersenne(1)/prime(1)) = mod(1/2) = 1
a(2) = mod(mersenne(2)/prime(2)) = mod(3/3) = 0
a(3) = mod(mersenne(3)/prime(3)) = mod(7/5) = 2
a(4) = mod(mersenne(4)/prime(4)) = mod(15/7) = 1
a(5) = mod(mersenne(5)/prime(5)) = mod(31/11) = 9
PROG
(MATLAB)
% n = number of computed terms of sequence
for i=1:n,
a(i) = mod(mersenne(i), prime(i)) ;
end
(PARI) a(n) = (2^n-1)%prime(n)
(PARI) a(n)=lift(Mod(2, prime(n))^n-1) \\ Charles R Greathouse IV, Jun 29 2011
CROSSREFS
Cf. A000225 (Mersenne), A000040 (prime), A082495.
Sequence in context: A305178 A295851 A368375 * A063579 A240085 A078623
KEYWORD
nonn
AUTHOR
Pasi Airikka, Jun 28 2011
STATUS
approved