login
Values of S(1) such that any Mersenne prime with an odd exponent p divides S(p-2), where S(n) == S(n-1)^2 - 2 (mod M(p)).
2

%I #21 Mar 31 2012 10:24:06

%S 14,98,2702,524174,940898,101687054,9034502498,19726764302,

%T 3826890587534,86749292044898,742397047217294,144021200269567502,

%U 832966693180608098,27939370455248878094,5420093847118012782734,7998146101170906912098,1051470266970439230972302

%N Values of S(1) such that any Mersenne prime with an odd exponent p divides S(p-2), where S(n) == S(n-1)^2 - 2 (mod M(p)).

%H Arkadiusz Wesolowski, <a href="/A206257/b206257.txt">Table of n, a(n) for n = 1..150</a>

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Lucas-Lehmer_primality_test">Lucas-Lehmer primality test</a>

%F Union of sequences a(0) = 14, a(1) = 2702; a(n) = 194*a(n-1) - a(n-2) and b(0) = 98, b(1) = 940898; b(n) = 9602*b(n-1) - b(n-2).

%F a(n) = A018844(n)^2 - 2.

%t nn = 17; t1 = LinearRecurrence[{194, -1}, {14, 2702}, nn]; t2 = LinearRecurrence[{9602, -1}, {98, 940898}, nn]; t3 = Select[t2, # < t1[[-1]]&]; Union[t1, t3]

%K easy,nonn

%O 1,1

%A _Arkadiusz Wesolowski_, Feb 05 2012