The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A061853 Difference between smallest prime not dividing n and smallest nondivisor of n. 2
 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,30 COMMENTS a(12m+6) is always positive since it involves subtracting 4 from a larger number; the first case where a term not of this form is positive is a(420). Primorials from A002110(2)=6 onward seem to give the positions of records. - Antti Karttunen, Jul 28 2017 Difference between the smallest prime coprime to n and the smallest non-divisor of n. - Michael De Vlieger, Jul 28 2017 LINKS Antti Karttunen, Table of n, a(n) for n = 1..30030 FORMULA a(n) = A053669(n) - A007978(n). EXAMPLE a(29)=2-2=0; a(30)=7-4=3; a(420)=11-8=3. PROG (PARI) a(n) = {my(f = factor(n), d = divisors(f), res, p = 2, i = 1, j); while(i<=#f~ && f[i, 1]==p, i++; p = nextprime(p+1)); res = p; for(j=2, #d, if(d[j]!=j, return(res - d[j-1] - 1)))} \\ David A. Corneth, Jul 29 2017 (Python) from sympy import nextprime def a053669(n):     p=2     while n%p==0: p=nextprime(p)     return p def a007978(n):     p=2     while n%p==0: p+=1     return p def a(n): return a053669(n) - a007978(n) print map(a, range(1, 101)) # Indranil Ghosh, Jul 29 2017 CROSSREFS Cf. A002110, A007978, A053669. Sequence in context: A045840 A181000 A335453 * A010104 A282673 A327159 Adjacent sequences:  A061850 A061851 A061852 * A061854 A061855 A061856 KEYWORD nonn AUTHOR Henry Bottomley, May 10 2001 EXTENSIONS Description corrected by Michael De Vlieger, Jul 28 2017 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.

Last modified July 12 02:34 EDT 2020. Contains 335658 sequences. (Running on oeis4.)