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!)
A248755 a(n) is the number of iterations for the Lucas-Lehmer sequence A003010 (mod p_n) to enter a loop, where p_n is the n-th prime number A000040(n). 0
2, 2, 1, 4, 3, 3, 4, 2, 5, 4, 6, 5, 4, 5, 11, 3, 15, 6, 5, 3, 5, 6, 11, 13, 5, 4, 9, 27, 11, 10, 8, 7, 23, 13, 20, 12, 14, 10, 41, 28, 12, 4, 36, 4, 15, 13, 27, 8, 15, 11, 13, 24, 5, 51, 8, 65, 36, 8, 13, 47, 36, 42, 31, 20, 13, 52, 42, 6, 87, 16, 30, 89, 15, 7, 36, 95, 6, 17, 34, 10 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
The Lucas-Lehmer sequence is used to test for Mersenne primes (A001348), but this is irrelevant for this sequence.
LINKS
Eric W. Weisstein's World of Mathematics, Lucas-Lehmer Test
EXAMPLE
a(4) is 4 because p_4 = 7, and the sequence A003010 (mod 7) becomes -> 4, 0, 5, 2, 2, 2, 2, 2, 2, .... The term 2 which is the first term of an infinite loop is at position 4.
MATHEMATICA
f[n_] := -1 + Length@ NestWhileList[ Mod[#^2 - 2, Prime[n]] &, 4, UnsameQ[##] &, {2, Infinity}]; Array[f, 80]
CROSSREFS
Sequence in context: A122918 A177424 A286332 * A129903 A263203 A023616
KEYWORD
nonn,easy
AUTHOR
Robert G. Wilson v, Oct 13 2014
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 23 22:36 EDT 2024. Contains 371917 sequences. (Running on oeis4.)