login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A095925
Smallest m such that prime(n) mod m > 1.
1
3, 4, 3, 4, 3, 5, 3, 4, 3, 3, 4, 5, 3, 4, 3, 3, 3, 7, 4, 3, 5, 4, 3, 3, 5, 3, 4, 3, 5, 3, 4, 3, 3, 4, 3, 4, 5, 4, 3, 3, 3, 7, 3, 5, 3, 4, 4, 4, 3, 5, 3, 3, 7, 3, 3, 3, 3, 4, 5, 3, 4, 3, 4, 3, 5, 3, 4, 5, 3, 5, 3, 3, 4, 5, 4, 3, 3, 5, 3, 5, 3, 8, 3, 5, 4, 3, 3, 5, 3, 4, 3, 3, 4, 3, 4, 3, 3, 3, 4, 7, 4, 3
OFFSET
1,1
EXAMPLE
A000040(25)=97: 97 mod 1 = 0, 97 mod 2 = 1, 97 mod 3 = 1, 97
mod 4 = 1, but 97 mod 5 = 2>1, therefore a(25)=5.
MATHEMATICA
smp1[n_]:=Module[{m=2}, While[Mod[n, m]<2, m++]; m]; smp1/@Prime[Range[120]] (* Harvey P. Dale, Aug 04 2021 *)
CROSSREFS
Sequence in context: A108026 A010702 A345439 * A242744 A066783 A046536
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jul 12 2004
STATUS
approved