cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A061399 Number of nonsquarefree integers between primes prime(n) and prime(n+1).

This page as a plain text file.
%I A061399 #32 Dec 09 2024 15:25:20
%S A061399 0,1,0,2,1,1,1,1,4,0,2,1,0,2,4,2,1,2,1,1,2,2,2,3,3,0,1,1,1,7,1,3,0,4,
%T A061399 1,3,2,1,4,2,1,3,1,1,1,4,3,2,1,1,2,1,6,2,2,2,1,3,2,0,4,6,1,1,2,4,3,5,
%U A061399 1,3,1,4,3,3,1,3,2,1,3,3,1,4,1,1,2,2,3,2,0,1,5,3,2,3,1,3,4,1,9,1,5,2,3,0,3
%N A061399 Number of nonsquarefree integers between primes prime(n) and prime(n+1).
%H A061399 Harry J. Smith, <a href="/A061399/b061399.txt">Table of n, a(n) for n=1..1000</a>
%e A061399 Between 113 and 127 the 7 numbers which are not squarefree are {116,117,120,121,124,125,126}, so a(30)=7.
%e A061399 From _Gus Wiseman_, Dec 07 2024: (Start)
%e A061399 The a(n) nonsquarefree numbers for n = 1..15:
%e A061399    1   2   3   4   5   6   7   8   9  10  11  12  13  14  15
%e A061399   ----------------------------------------------------------
%e A061399    .   4   .   8  12  16  18  20  24   .  32  40   .  44  48
%e A061399                9                  25      36          45  49
%e A061399                                   27                      50
%e A061399                                   28                      52
%e A061399 (End)
%t A061399 Count[Range[#[[1]]+1,#[[2]]-1],_?(!SquareFreeQ[#]&)]&/@Partition[Prime[Range[120]],2,1] (* _Harvey P. Dale_, Mar 31 2024 *)
%o A061399 (PARI) { n=0; q=2; forprime (p=3, prime(1001), a=0; for (i=q+1, p-1, a+=!issquarefree(i)); write("b061399.txt", n++, " ", a); q=p ) } \\ _Harry J. Smith_, Jul 22 2009
%o A061399 (PARI) a(n) = my(p=prime(n)); sum(k=p, nextprime(p+1), ! issquarefree(k)); \\ _Michel Marcus_, Dec 09 2024
%o A061399 (Python)
%o A061399 from sympy import mobius, prime
%o A061399 def A061399(n): return sum(not mobius(m) for m in range(prime(n)+1,prime(n+1))) # _Chai Wah Wu_, Jul 20 2024
%Y A061399 Zeros are A068361.
%Y A061399 First differences of A378086, restriction of A057627 to the primes.
%Y A061399 Other classes (instead of nonsquarefree):
%Y A061399 - For composite we have A046933, first differences of A065890.
%Y A061399 - For squarefree see A061398, A068360, A071403, A373197, A373198, A377431.
%Y A061399 - For prime power we have A080101.
%Y A061399 - For non prime power we have A368748, see A378616.
%Y A061399 - For perfect power we have A377432, zeros A377436.
%Y A061399 - For non perfect power we have A377433, A029707.
%Y A061399 A000040 lists the primes, differences A001223, seconds A036263.
%Y A061399 A005117 lists the squarefree numbers, differences A076259.
%Y A061399 A013929 lists the nonsquarefree numbers, differences A078147.
%Y A061399 A120327 gives the least nonsquarefree number >= n.
%Y A061399 Cf. A007674, A053806, A072284, A073247, A179211, A224363.
%Y A061399 Cf. A013928, A067535, A070321, A112925, A112926, A240473, A240474.
%Y A061399 Cf. A045882, A377049, A377783, A378032, A378618.
%K A061399 nonn
%O A061399 1,4
%A A061399 _Labos Elemer_, Jun 07 2001