OFFSET
1,1
LINKS
Arkadiusz Wesolowski, Table of n, a(n) for n = 1..150
Wikipedia, Lucas-Lehmer primality test
FORMULA
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).
a(n) = A018844(n)^2 - 2.
MATHEMATICA
nn = 17; t1 = LinearRecurrence[{194, -1}, {14, 2702}, nn]; t2 = LinearRecurrence[{9602, -1}, {98, 940898}, nn]; t3 = Select[t2, # < t1[[-1]]&]; Union[t1, t3]
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Arkadiusz Wesolowski, Feb 05 2012
STATUS
approved