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!)
A121889 Least m such that (prime(n) mod m) > (prime(n+1) mod m). 0
3, 4, 3, 5, 3, 5, 3, 5, 4, 3, 4, 5, 3, 5, 4, 7, 3, 7, 5, 3, 7, 5, 4, 3, 5, 3, 5, 3, 5, 3, 5, 4, 3, 4, 3, 4, 7, 5, 4, 7, 3, 7, 3, 5, 3, 5, 13, 5, 3, 5, 7, 3, 11, 4, 7, 4, 3, 4, 5, 3, 4, 3, 5, 3, 5, 3, 4, 11, 3, 5, 7, 3, 4, 7, 5, 4, 3, 5, 3, 11, 3, 11, 3, 7, 5, 4, 3, 5, 3, 5, 7, 3, 5, 3, 5, 4, 5, 3, 4, 7, 4, 7, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
a(100) = 7 because prime(100) = 541 == 2 mod 7, prime(101) = 547 == 1 mod 7 and 7 is least m such that 541 > 547 mod m.
MATHEMATICA
s={}; Do[pn=Prime[n]; pn1=Prime[n+1]; Do[If[Mod[pn, m]>Mod[pn1, m], AppendTo[s, {n, pn, pn1, m}]; Break[]], {m, 2, 200}], {n, 1, 130}]; Last/@s
lm[n_]:=Module[{m=2, pn0=Prime[n], pn1=Prime[n+1]}, While[Mod[pn0, m]<= Mod[ pn1, m], m++]; m]; Array[lm, 110] (* Harvey P. Dale, May 27 2014 *)
CROSSREFS
Sequence in context: A090739 A076400 A363194 * A332026 A205692 A342927
KEYWORD
nonn
AUTHOR
Zak Seidov, Aug 31 2006
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 May 4 23:24 EDT 2024. Contains 372257 sequences. (Running on oeis4.)