login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A060362 a(n) = Min { { smallest prime > k } - k, k - { largest prime < k } }, where k = lcm(1..n) = A003418(n). 0
1, 1, 1, 1, 1, 1, 1, 1, 13, 13, 23, 23, 23, 17, 19, 19, 1, 1, 1, 1, 1, 1, 1, 1, 31, 31, 1, 1, 1, 1, 1, 1, 1, 1, 43, 43, 43, 43, 47, 47, 59, 59, 59, 59, 1, 1, 59, 59, 59, 59, 61, 61, 61, 61, 61, 61, 113, 113, 1, 1, 1, 97, 97, 97, 73, 73, 73, 73, 73, 73, 97 (list; graph; refs; listen; history; text; internal format)
OFFSET

3,9

LINKS

Table of n, a(n) for n=3..73.

MAPLE

[seq( min( nextprime(A003418(n))-A003418(n), A003418(n)-prevprime(A003418(n)) ), n=3..100)];

MATHEMATICA

Min[NextPrime[#]-#, #-NextPrime[#, -1]]&/@Table[LCM@@Range[n], {n, 80}] (* Harvey P. Dale, Jan 01 2019 *)

PROG

(PARI) a(n) = my(lcn = lcm([1..n])); min(nextprime(lcn+1)-lcn, lcn-precprime(lcn-1)); \\ Michel Marcus, Mar 29 2018

CROSSREFS

Cf. A003418, A060357, A060358, A060359, A060360, A060361.

Sequence in context: A294657 A201773 A072519 * A003888 A303717 A040157

Adjacent sequences:  A060359 A060360 A060361 * A060363 A060364 A060365

KEYWORD

nonn

AUTHOR

N. J. A. Sloane, Apr 01 2001

EXTENSIONS

Definition corrected by Jon E. Schoenfield, Mar 18 2018

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 13 19:36 EDT 2021. Contains 343868 sequences. (Running on oeis4.)