login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A060359 a(n) = (smallest prime > k) - (largest prime < k), where k = lcm(1..n). 2
2, 2, 2, 2, 2, 14, 18, 18, 32, 32, 54, 54, 54, 40, 62, 62, 2, 2, 2, 2, 42, 42, 30, 30, 72, 72, 44, 44, 44, 42, 42, 42, 42, 42, 96, 96, 96, 96, 126, 126, 142, 142, 142, 142, 2, 2, 142, 142, 142, 142, 122, 122, 122, 122, 122, 122, 262, 262, 98, 98 (list; graph; refs; listen; history; text; internal format)
OFFSET
3,1
LINKS
FORMULA
a(n) = A013633(A003418(n)). - Michel Marcus, Mar 20 2018
MAPLE
a:= n-> (m->nextprime(m)-prevprime(m))(ilcm($1..n)):
seq (a(n), n=3..100);
MATHEMATICA
f[n_]:=Module[{lcmn=LCM@@Range[n]}, NextPrime[lcmn]-NextPrime[lcmn, -1]]; f/@Range[3, 70] (* Harvey P. Dale, Feb 04 2011 *)
PROG
(PARI) a(n) = my(lc = lcm([1..n])); nextprime(lc+1) - precprime(lc-1); \\ Michel Marcus, Mar 20 2018
CROSSREFS
Sequence in context: A260725 A058005 A095386 * A029665 A256223 A056993
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Apr 01 2001
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)