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!)
A240474 Distance from prime(n) to the closest larger squarefree number. 4
1, 2, 1, 3, 2, 1, 2, 2, 3, 1, 2, 1, 1, 3, 4, 2, 2, 1, 2, 2, 1, 3, 2, 2, 4, 1, 2, 2, 1, 1, 2, 2, 1, 2, 2, 3, 1, 2, 3, 1, 2, 1, 2, 1, 2, 2, 2, 3, 2, 1, 2, 2, 5, 2, 1, 2, 2, 2, 1, 1, 2, 2, 2, 2, 1, 1, 3, 2, 2, 4, 1, 3, 3, 1, 2, 2, 1, 1, 1, 1, 2, 1, 2, 1, 3, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(n) = A112926(n) - A000040(n). - Michel Marcus, Apr 10 2014
EXAMPLE
a(9) = 3 because 3 is the gap between prime(9) = 23 and the closest larger squarefree number 26.
PROG
(PARI) forprime(p=1, 450, for(j=p+1, 2*p, if(issquarefree(j), print1(j-p", "); break)))
CROSSREFS
Sequence in context: A026141 A089209 A153359 * A023510 A005678 A296976
KEYWORD
nonn
AUTHOR
Chris Boyd, Apr 06 2014
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 24 10:11 EDT 2024. Contains 371935 sequences. (Running on oeis4.)