|
| |
|
|
A013632
|
|
nextprime(n)-n.
|
|
12
| |
|
|
2, 1, 1, 2, 1, 2, 1, 4, 3, 2, 1, 2, 1, 4, 3, 2, 1, 2, 1, 4, 3, 2, 1, 6, 5, 4, 3, 2, 1, 2, 1, 6, 5, 4, 3, 2, 1, 4, 3, 2, 1, 2, 1, 4, 3, 2, 1, 6, 5, 4, 3, 2, 1, 6, 5, 4, 3, 2, 1, 2, 1, 6, 5, 4, 3, 2, 1, 4, 3, 2, 1, 2, 1, 6, 5, 4, 3, 2, 1, 4, 3, 2, 1, 6, 5, 4, 3, 2, 1, 8, 7, 6, 5, 4, 3, 2, 1, 4, 3, 2, 1, 2, 1, 4, 3
(list; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 0,1
|
|
|
COMMENTS
| Except for a(0) and a(1), a(n) is the least k such that the GCD( n!, n+k) = 1. [From Robert G. Wilson v (rgwv(AT)rgwv.com), Nov 05 2010]
|
|
|
MAPLE
| [ seq(nextprime(i)-i, i=0..100) ];
|
|
|
MATHEMATICA
| f[n_] := NextPrime@n - n; Array[f, 105, 0] [From Robert G. Wilson v (rgwv(AT)rgwv.com), Nov 05 2010]
|
|
|
CROSSREFS
| Sequence in context: A134838 A049843 A131374 * A080121 A122901 A001917
Adjacent sequences: A013629 A013630 A013631 * A013633 A013634 A013635
|
|
|
KEYWORD
| nonn,easy
|
|
|
AUTHOR
| N. J. A. Sloane (njas(AT)research.att.com).
|
|
|
EXTENSIONS
| Incorrect comment removed by Charles R Greathouse IV (charles.greathouse(AT)case.edu), Mar 18 2010
More terms from Robert G. Wilson v (rgwv(AT)rgwv.com), Nov 05 2010
|
| |
|
|