login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A013632 nextprime(n)-n. 14
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; text; 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, Nov 05 2010]

LINKS

Table of n, a(n) for n=0..104.

MAPLE

[ seq(nextprime(i)-i, i=0..100) ];

MATHEMATICA

f[n_] := NextPrime@n - n; Array[f, 105, 0] [From Robert G. Wilson v, Nov 05 2010]

CROSSREFS

Sequence in context: A049843 A131374 A207409 * A080121 A122901 A001917

Adjacent sequences:  A013629 A013630 A013631 * A013633 A013634 A013635

KEYWORD

nonn,easy

AUTHOR

N. J. A. Sloane.

EXTENSIONS

Incorrect comment removed by Charles R Greathouse IV, Mar 18 2010

More terms from Robert G. Wilson v, Nov 05 2010

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified June 19 00:01 EDT 2013. Contains 226356 sequences.