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!)
A061398 Number of squarefree integers between prime(n) and prime(n+1). 7
0, 0, 1, 1, 0, 2, 0, 2, 1, 1, 3, 2, 1, 1, 1, 3, 0, 3, 2, 0, 3, 1, 3, 4, 0, 1, 2, 0, 2, 6, 2, 2, 1, 5, 0, 2, 3, 2, 1, 3, 0, 6, 0, 2, 0, 7, 8, 1, 0, 2, 3, 0, 3, 3, 3, 3, 0, 2, 1, 1, 5, 7, 2, 0, 1, 9, 2, 4, 0, 0, 4, 3, 2, 2, 2, 2, 5, 2, 4, 6, 0, 5, 0, 4, 1, 3, 4, 1, 1, 2, 6, 4, 1, 4, 2, 2, 7, 0, 8, 4, 4, 3, 2, 1, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,6

LINKS

Harry J. Smith, Table of n, a(n) for n = 1..1000

FORMULA

a(n) = A013928(A000040(n+1)) - A013928(A000040(n)) - 1. - Robert Israel, Jan 06 2017

EXAMPLE

Between 113 and 127 the 6 squarefree numbers are 114, 115, 118, 119, 122, 123, so a(30)=6.

MAPLE

p:= 2:

for n from 1 to 200 do

q:= nextprime(p);

A[n]:= nops(select(numtheory:-issqrfree, [$p+1..q-1]));

p:= q;

od:

seq(A[i], i=1..200); # Robert Israel, Jan 06 2017

MATHEMATICA

a[n_] := Count[Range[Prime[n]+1, Prime[n+1]-1], _?SquareFreeQ];

Array[a, 100] (* Jean-François Alcover, Feb 28 2019 *)

Count[Range[#[[1]]+1, #[[2]]-1], _?(SquareFreeQ[#]&)]&/@Partition[ Prime[ Range[120]], 2, 1] (* Harvey P. Dale, Oct 14 2021 *)

PROG

(PARI) { n=0; q=2; forprime (p=3, prime(1001), a=0; for (i=q+1, p-1, a+=issquarefree(i)); write("b061398.txt", n++, " ", a); q=p ) } \\ Harry J. Smith, Jul 22 2009

(PARI) a(n) = my(pp=prime(n)+1); sum(k=pp, nextprime(pp)-1, issquarefree(k)); \\ Michel Marcus, Feb 28 2019

CROSSREFS

Cf. A000040, A005117, A013928.

Cf. A179211. [Reinhard Zumkeller, Jul 05 2010]

Sequence in context: A055651 A175929 A079627 * A080232 A008482 A037012

Adjacent sequences: A061395 A061396 A061397 * A061399 A061400 A061401

KEYWORD

nonn

AUTHOR

Labos Elemer, Jun 07 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 February 26 13:56 EST 2023. Contains 360651 sequences. (Running on oeis4.)