login
A172130
a(n) = the smallest k such that n(n+1)(n+2)...(n+k-1)-1 is a prime
1
3, 2, 1, 1, 2, 1, 3, 1, 2, 2, 2, 1, 2, 1, 2, 2, 3, 1, 2, 1, 2, 3, 3, 1, 17, 2, 4, 2, 6, 1, 2, 1, 10, 3, 2, 9, 3, 1, 2, 3, 2, 1, 4, 1, 2, 2, 3, 1, 4, 2, 8, 7, 2, 1, 2, 2, 3, 3, 2, 1, 11, 1, 3, 2, 2, 2, 5, 1, 3, 2, 11, 1, 4, 1, 3, 2, 7, 7, 5, 1, 4, 38, 2, 1, 2, 2, 7, 9, 2, 1, 4, 4, 2, 2, 4, 2, 3, 1, 14, 2, 2, 1, 2
OFFSET
1,1
COMMENTS
a(534) = 624 is particularly large.
MATHEMATICA
a[n_] := Block[{}, For[s = n; k = 1, ! PrimeQ[s - 1], s *= n + k; k++ ]; k]; Table[a[n], {n, 1, 300}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Cheng Zhang (cz1(AT)rice.edu), Jan 26 2010, Mar 03 2010
STATUS
approved