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!)
A121937 a(n) = least m >= 2 such that (n mod m) > (n+2 mod m). 2
3, 3, 4, 3, 3, 4, 3, 3, 5, 3, 3, 7, 3, 3, 4, 3, 3, 4, 3, 3, 11, 3, 3, 5, 3, 3, 4, 3, 3, 4, 3, 3, 5, 3, 3, 19, 3, 3, 4, 3, 3, 4, 3, 3, 23, 3, 3, 5, 3, 3, 4, 3, 3, 4, 3, 3, 29, 3, 3, 31, 3, 3, 4, 3, 3, 4, 3, 3, 5, 3, 3, 37, 3, 3, 4, 3, 3, 4, 3, 3, 41, 3, 3, 5, 3, 3, 4, 3, 3, 4, 3, 3, 5, 3, 3, 7, 3, 3, 4, 3, 3, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
at n = 1,4,7,... and n = 2,5,8,... a(n) = 3; also n = 3,15,27,... and n = 6,18,30,... a(n) = 4; all other terms are apparently primes. In case k=1, for all n, a(n) = least prime divisor of n+1.
LINKS
MATHEMATICA
re=Reap[Do[Do[If[Mod[n, k]>Mod[n+2, k], Sow[k]; Break[]], {k, 2, n+2}], {n, 300}]][[2, 1]]
lm[n_]:=Module[{m=2}, While[Mod[n, m]<=Mod[n+2, m], m++]; m]; Array[lm, 110] (* Harvey P. Dale, May 21 2023 *)
CROSSREFS
Sequence in context: A172515 A188590 A080038 * A003034 A091282 A202708
KEYWORD
nonn
AUTHOR
Zak Seidov, Sep 03 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 September 8 12:39 EDT 2024. Contains 375753 sequences. (Running on oeis4.)