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.

Showing 1-10 of 38 results. Next

A243347 a(1)=1, and for n>1, if mu(n) = 0, a(n) = A005117(1+a(A057627(n))), otherwise, a(n) = A013929(a(A013928(n))).

Original entry on oeis.org

1, 4, 12, 2, 32, 8, 84, 6, 19, 24, 220, 3, 18, 50, 63, 53, 564, 13, 9, 138, 49, 128, 162, 10, 31, 136, 38, 365, 1448, 36, 25, 5, 351, 126, 332, 30, 414, 27, 81, 82, 348, 99, 931, 103, 86, 3699, 96, 929, 21, 14, 64, 223, 16, 79, 892, 210, 325, 847, 80, 265, 1056, 72, 15, 51, 208, 212, 884, 221, 256
Offset: 1

Views

Author

Antti Karttunen, Jun 03 2014

Keywords

Comments

Self-inverse permutation of natural numbers.
Shares with A088609 the property that after 1, positions indexed by squarefree numbers larger than one, A005117(n+1): 2, 3, 5, 6, 7, 10, 11, 13, 14, ... contain only nonsquarefree numbers A013929: 4, 8, 9, 12, 16, 18, 20, 24, ..., and vice versa. However, instead of placing terms in those subsets in monotone order this sequence recursively permutes the order of both subsets with the emerging permutation itself, thus implementing a kind of "deep" variant of A088609. Alternatively, this can be viewed as yet another "entanglement permutation", where two pairs of complementary subsets of natural numbers are interwoven with each other. In this case complementary pair A005117/A013929 is entangled with complementary pair A013929/A005117.

Crossrefs

Formula

a(1), and for n>1, if mu(n) = 0, a(n) = A005117(1+a(A057627(n))), otherwise, a(n) = A013929(a(A013928(n))). [Here mu is Moebius mu-function, A008683, which is zero only when n is a nonsquarefree number, one of the numbers in A013929.]
For all n > 1, A008966(a(n)) = 1 - A008966(n), or equally, mu(a(n)) + 1 = mu(n) modulo 2, where mu is Moebius mu (A008683). [Note: Permutation A088609 satisfies the same condition.]

A284584 a(1) = 0; for n > 1, if n is not squarefree, then a(n) = A057627(n), otherwise a(n) = A013928(n).

Original entry on oeis.org

0, 1, 2, 1, 3, 4, 5, 2, 3, 6, 7, 4, 8, 9, 10, 5, 11, 6, 12, 7, 13, 14, 15, 8, 9, 16, 10, 11, 17, 18, 19, 12, 20, 21, 22, 13, 23, 24, 25, 14, 26, 27, 28, 15, 16, 29, 30, 17, 18, 19, 31, 20, 32, 21, 33, 22, 34, 35, 36, 23, 37, 38, 24, 25, 39, 40, 41, 26, 42, 43, 44, 27, 45, 46, 28, 29, 47, 48, 49, 30, 31, 50, 51, 32, 52, 53, 54, 33, 55, 34, 56, 35, 57, 58, 59, 36
Offset: 1

Views

Author

Antti Karttunen, Apr 17 2017

Keywords

Comments

Each number n > 0 occurs exactly twice in this sequence, at the positions A005117(1+n) and A013929(n).

Crossrefs

Cf. A066136 (a similar sequence).

Programs

  • Python
    from sympy import mobius
    from sympy.ntheory.factor_ import core
    def a057627(n): return n - sum([mobius(k)**2 for k in range(1, n + 1)])
    def a013928(n): return sum([1 for i in range(1, n) if core(i) == i])
    def a(n):
        if n==1: return 0
        if core(n)==n: return a013928(n)
        else: return a057627(n)
    print([a(n) for n in range(1, 121)]) # Indranil Ghosh, Apr 17 2017
  • Scheme
    (define (A284584 n) (cond ((= 1 n) 0) ((zero? (A008683 n)) (A057627 n)) (else (A013928 n))))
    

Formula

a(1) = 0; for n > 1, if A008683(n) is 0 [when n is not squarefree], then a(n) = A057627(n), otherwise a(n) = A013928(n).

A013928 Number of (positive) squarefree numbers < n.

Original entry on oeis.org

0, 1, 2, 3, 3, 4, 5, 6, 6, 6, 7, 8, 8, 9, 10, 11, 11, 12, 12, 13, 13, 14, 15, 16, 16, 16, 17, 17, 17, 18, 19, 20, 20, 21, 22, 23, 23, 24, 25, 26, 26, 27, 28, 29, 29, 29, 30, 31, 31, 31, 31, 32, 32, 33, 33, 34, 34, 35, 36, 37, 37, 38, 39, 39, 39, 40, 41, 42, 42, 43, 44, 45, 45, 46, 47, 47, 47, 48, 49, 50, 50, 50, 51
Offset: 1

Views

Author

Keywords

Comments

For n >= 1 define an n X n (0, 1) matrix A by A[i, j] = 1 if gcd(i, j) = 1, A[i, j] = 0 if gcd(i, j) > 1 for 1 <= i,j <= n . The rank of A is a(n + 1). Asymptotic expression for a(n) is a(n) ~ n * 6 / Pi^2. - Sharon Sela (sharonsela(AT)hotmail.com), May 06 2002
a(n) = Sum_{k=1..n-1} A008966(k). - Reinhard Zumkeller, Jul 05 2010
For all n >= 1, a(n)/n >= a(176)/176 = 53/88, and the equality occurs only for n=176 (see K. Rogers link). - Michel Marcus, Dec 16 2012 [Thus the Schnirelmann density of the squarefree numbers is 53/88. - Charles R Greathouse IV, Feb 02 2016]
Cohen, Dress, & El Marraki prove that |a(n) - 6n/Pi^2| < 0.02767*sqrt(n) for n >= 438653. - Charles R Greathouse IV, Feb 02 2016

Examples

			a(10) = 6 because there are 6 squarefree numbers up to 10: 1, 2, 3, 5, 6, 7.
a(11) = 7 because there are 7 squarefree numbers up to 11: the numbers listed above for 10, plus 10 itself.
a(13) = 8 because the 12 X 12 matrix described in the first comment by Sharon Sela has rank 8. Rows 2,4,8 (the powers of two) are identical, rows 3,9 (the powers of three) are identical, and rows 6 and 12 (same prime factors) are identical. - _Geoffrey Critzer_, Dec 07 2014
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
1, 0, 1, 0, 1, 0, 1, 0, 1, 0  1, 0, ...
1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, ...
1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, ...
1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, ...
1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, ...
1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, ...
1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, ...
1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, ...
1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, ...
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, ...
1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, ...
.                                   .
.                                    .
.                                     .
		

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, Fifth edition (1979), Clarendon Press, pp. 269-270.
  • E. Landau, Über den Zusammenhang einiger neuer Sätze der analytischen Zahlentheorie, Wiener Sitzungberichte, Math. Klasse 115 (1906), pp. 589-632. Cited in Sándor, Mitrinović, & Crstici.
  • József Sándor, Dragoslav S. Mitrinovic, and Borislav Crstici, Handbook of Number Theory I. Springer, 2005. Section VI.18.

Crossrefs

One less than A107079.
Cf. A158819 Number of squarefree numbers <= n minus round(n/zeta(2)).

Programs

  • Haskell
    a013928 n = a013928_list !! (n-1)
    a013928_list = scanl (+) 0 $ map a008966 [1..]
    -- Reinhard Zumkeller, Aug 03 2012
    
  • Maple
    ListTools:-PartialSums([0,seq(numtheory:-mobius(i)^2,i=1..100)]); # Robert Israel, Dec 11 2014
  • Mathematica
    Accumulate[Table[Abs[MoebiusMu[n]], {n, 0, 79}]] (* Alonso del Arte, Oct 07 2012 *)
    Accumulate[Table[If[SquareFreeQ[n],1,0],{n,0,80}]] (* Harvey P. Dale, Mar 06 2019 *)
  • PARI
    a(n)=sum(i=1,n-1,if(issquarefree(i),1,0)) \\ Lifchitz
    
  • PARI
    a(n)=n--;sum(k=1,sqrtint(n),moebius(k)*(n\k^2)) \\ Benoit Cloitre, Oct 25 2009
    
  • PARI
    a(n)=n--; my(s); forfactored(k=1,sqrtint(n), s += n\k[1]^2*moebius(k)); s \\ Charles R Greathouse IV, Nov 05 2017
    
  • PARI
    a(n)=n--; my(s); forsquarefree(k=1, sqrtint(n), s += n\k[1]^2*moebius(k)); s \\ Charles R Greathouse IV, Jan 08 2018
    
  • Python
    from sympy.ntheory.factor_  import core
    def a(n): return sum ([1 for i in range(1, n) if core(i) == i]) # Indranil Ghosh, Apr 16 2017
    
  • Python
    from math import isqrt
    from sympy import mobius
    def A013928(n): return sum(mobius(k)*((n-1)//k**2) for k in range(1,isqrt(n-1)+1)) # Chai Wah Wu, Jan 03 2024

Formula

a(n) = Sum_{k = 1..n-1} mu(k)^2. - Vladeta Jovovic, May 18 2001
a(n) = Sum_{d = 1..floor(sqrt(n - 1))} mu(d)*floor((n - 1)/d^2) where mu(d) is the Moebius function (A008683). - Vladeta Jovovic, Apr 06 2001
Asymptotic formula (with error term): a(n) = Sum_{k = 1..n-1} mu(k)^2 = Sum_{k = 1..n-1} |mu(k)| = 6*n/Pi^2 + O(sqrt(n)). - Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Jul 20 2002
a(n) = Sum_{k = 0..n} if(k <= n-1, mu(n - k) mod 2, else 0; a(n + 1) = Sum_{k = 0..n} mu(n - k + 1) mod 2. - Paul Barry, May 10 2005
a(n + 1) = Sum_{k = 0..n} abs(mu(n - k + 1)). - Paul Barry, Jul 20 2005
a(n) = Sum_{k = 1..floor(sqrt(n))} mu(k)*floor(n/k^2). - Benoit Cloitre, Oct 25 2009
Landau proved that a(n) = 6*n/Pi^2 + o(sqrt(n)). - Charles R Greathouse IV, Feb 02 2016
Vaidya proved that a(n) = 6*n/Pi^2 + O(n^k) for any k > 2/5 on the Riemann hypothesis. - Charles R Greathouse IV, Feb 02 2016
a(n) = A107079(n)-1. - Antti Karttunen, Oct 07 2016
G.f.: Sum_{k>=1} mu(k)^2*x^(k+1)/(1 - x). - Ilya Gutkovskiy, Feb 06 2017
a(n+1) = n - A057627(n) - Antti Karttunen, Apr 17 2017

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

Original entry on oeis.org

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, 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, 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
Offset: 1

Views

Author

Labos Elemer, Jun 07 2001

Keywords

Examples

			Between 113 and 127 the 7 numbers which are not squarefree are {116,117,120,121,124,125,126}, so a(30)=7.
From _Gus Wiseman_, Dec 07 2024: (Start)
The a(n) nonsquarefree numbers for n = 1..15:
   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15
  ----------------------------------------------------------
   .   4   .   8  12  16  18  20  24   .  32  40   .  44  48
               9                  25      36          45  49
                                  27                      50
                                  28                      52
(End)
		

Crossrefs

Zeros are A068361.
First differences of A378086, restriction of A057627 to the primes.
Other classes (instead of nonsquarefree):
- For composite we have A046933, first differences of A065890.
- For squarefree see A061398, A068360, A071403, A373197, A373198, A377431.
- For prime power we have A080101.
- For non prime power we have A368748, see A378616.
- For perfect power we have A377432, zeros A377436.
- For non perfect power we have A377433, A029707.
A000040 lists the primes, differences A001223, seconds A036263.
A005117 lists the squarefree numbers, differences A076259.
A013929 lists the nonsquarefree numbers, differences A078147.
A120327 gives the least nonsquarefree number >= n.

Programs

A068361 Numbers n such that the number of squarefree numbers between prime(n) and prime(n+1) = prime(n+1)-prime(n)-1.

Original entry on oeis.org

1, 3, 10, 13, 26, 33, 60, 89, 104, 113, 116, 142, 148, 201, 209, 212, 234, 265, 268, 288, 313, 320, 332, 343, 353, 384, 398, 408, 477, 484, 498, 542, 545, 551, 577, 581, 601, 625, 636, 671, 719, 723, 726, 745, 794, 805, 815, 862, 864, 884, 944, 964, 995, 1054
Offset: 1

Views

Author

Benoit Cloitre, Feb 28 2002

Keywords

Comments

Also numbers k such that all numbers from prime(k) to prime(k+1) are squarefree. All such primes are twins, so this is a subset of A029707. The other twin primes are A061368. - Gus Wiseman, Dec 11 2024

Crossrefs

A subset of A029707 (lesser index of twin primes).
Prime index of each (prime) term of A061351.
Positions of zeros in A061399.
For perfect power instead of squarefree we have A377436, zeros of A377432.
Positions of zeros in A377784.
The rest of the twin primes are at A378620, indices of A061368.
A000040 lists the primes, differences A001223, (run-lengths A333254, A373821).
A005117 lists the squarefree numbers, differences A076259.
A006562 finds balanced primes.
A013929 lists the nonsquarefree numbers, differences A078147.
A014574 is the intersection of A006093 and A008864.
A038664 locates the first prime gap of size 2n.
A046933 counts composite numbers between primes.
A061398 counts squarefree numbers between primes, zeros A068360.
A120327 gives the least nonsquarefree number >= n.

Programs

  • Mathematica
    Select[Range[100],And@@SquareFreeQ/@Range[Prime[#],Prime[#+1]]&] (* Gus Wiseman, Dec 11 2024 *)
  • PARI
    isok(n) = for (k=prime(n)+1, prime(n+1)-1, if (!issquarefree(k), return (0))); 1; \\ Michel Marcus, Apr 29 2016

Formula

n such that A061398(n) = prime(n+1)-prime(n)-1.
prime(a(n)) = A061351(n). - Gus Wiseman, Dec 11 2024

A378033 Greatest nonsquarefree number <= n, or 1 if there is none (the case n <= 3).

Original entry on oeis.org

1, 1, 1, 4, 4, 4, 4, 8, 9, 9, 9, 12, 12, 12, 12, 16, 16, 18, 18, 20, 20, 20, 20, 24, 25, 25, 27, 28, 28, 28, 28, 32, 32, 32, 32, 36, 36, 36, 36, 40, 40, 40, 40, 44, 45, 45, 45, 48, 49, 50, 50, 52, 52, 54, 54, 56, 56, 56, 56, 60, 60, 60, 63, 64, 64, 64, 64, 68
Offset: 1

Views

Author

Gus Wiseman, Nov 18 2024

Keywords

Examples

			The nonsquarefree numbers <= 10 are {4, 8, 9}, so a(10) = 9.
		

Crossrefs

For prime-powers we have A031218, differences A377782.
Greatest of the nonsquarefree numbers counted by A057627.
The opposite for squarefree is A067535, differences A378087.
For squarefree we have A070321, differences A378085.
The opposite is A120327 (union A162966), differences A378039.
The restriction to the primes is A378032, opposite A377783 (union A378040).
First-differences are A378036, restriction A378034.
A000040 lists the primes, differences A001223, seconds A036263.
A005117 lists the squarefree numbers, differences A076259, seconds A376590.
A013929 lists the nonsquarefree numbers, differences A078147, seconds A376593.
A061398 counts squarefree numbers between primes (sums A337030), zeros A068360.
A061399 counts nonsquarefree numbers between primes (sums A378086), zeros A068361.
A112925 gives the greatest squarefree number < prime(n), differences A378038.
A112926 gives the least squarefree number > prime(n), differences A378037.
A377046 encodes k-differences of nonsquarefree numbers, zeros A377050.

Programs

  • Mathematica
    Table[NestWhile[#-1&,n,#>1&&SquareFreeQ[#]&],{n,100}]
  • PARI
    a(n) = my(k=n); while (issquarefree(k), k--); if(!k, 1, k); \\ Michel Marcus, Jul 26 2025

Formula

a(prime(n)) = A378032(n).
a(n) = A013929(A057627(n)), for n > 3. - Ridouane Oudra, Jul 26 2025

A071403 Which squarefree number is prime? a(n)-th squarefree number equals n-th prime.

Original entry on oeis.org

2, 3, 4, 6, 8, 9, 12, 13, 16, 18, 20, 24, 27, 29, 31, 33, 37, 38, 42, 45, 46, 50, 52, 56, 61, 62, 64, 67, 68, 71, 78, 81, 84, 86, 92, 93, 96, 100, 103, 105, 109, 110, 117, 118, 121, 122, 130, 139, 141, 142, 145, 149, 150, 154, 158, 162, 166, 167, 170, 172, 174, 180
Offset: 1

Views

Author

Labos Elemer, May 24 2002

Keywords

Comments

Also the number of squarefree numbers <= prime(n). - Gus Wiseman, Dec 08 2024

Examples

			a(25)=61 because A005117(61) = prime(25) = 97.
From _Gus Wiseman_, Dec 08 2024: (Start)
The squarefree numbers up to prime(n) begin:
n = 1  2  3  4   5   6   7   8   9  10
    ----------------------------------
    2  3  5  7  11  13  17  19  23  29
    1  2  3  6  10  11  15  17  22  26
       1  2  5   7  10  14  15  21  23
          1  3   6   7  13  14  19  22
             2   5   6  11  13  17  21
             1   3   5  10  11  15  19
                 2   3   7  10  14  17
                 1   2   6   7  13  15
                     1   5   6  11  14
                         3   5  10  13
                         2   3   7  11
                         1   2   6  10
                             1   5   7
                                 3   6
                                 2   5
                                 1   3
                                     2
                                     1
The column-lengths are a(n).
(End)
		

Crossrefs

The strict version is A112929.
A000040 lists the primes, differences A001223, seconds A036263.
A005117 lists the squarefree numbers, differences A076259.
A013929 lists the nonsquarefree numbers, differences A078147.
A070321 gives the greatest squarefree number up to n.
Other families: A014689, A027883, A378615, A065890.
Squarefree numbers between primes: A061398, A068360, A373197, A373198, A377430, A112925, A112926.
Nonsquarefree numbers: A057627, A378086, A061399, A068361, A120327, A377783, A378032, A378033.

Programs

  • Mathematica
    Position[Select[Range[300], SquareFreeQ], ?PrimeQ][[All, 1]] (* _Michael De Vlieger, Aug 17 2023 *)
  • PARI
    lista(nn)=sqfs = select(n->issquarefree(n), vector(nn, i, i)); for (i = 1, #sqfs, if (isprime(sqfs[i]), print1(i, ", "));); \\ Michel Marcus, Sep 11 2013
    
  • PARI
    a(n,p=prime(n))=sum(k=1, sqrtint(p), p\k^2*moebius(k)) \\ Charles R Greathouse IV, Sep 13 2013
    
  • PARI
    a(n,p=prime(n))=my(s); forfactored(k=1, sqrtint(p), s+=p\k[1]^2*moebius(k)); s \\ Charles R Greathouse IV, Nov 27 2017
    
  • PARI
    first(n)=my(v=vector(n),pr,k); forsquarefree(m=1,n*logint(n,2)+3, k++; if(m[2][,2]==[1]~, v[pr++]=k; if(pr==n, return(v)))) \\ Charles R Greathouse IV, Jan 08 2018
    
  • Python
    from math import isqrt
    from sympy import prime, mobius
    def A071403(n): return (p:=prime(n))+sum(mobius(k)*(p//k**2) for k in range(2,isqrt(p)+1)) # Chai Wah Wu, Jul 20 2024

Formula

A005117(a(n)) = A000040(n) = prime(n).
a(n) ~ (6/Pi^2) * n log n. - Charles R Greathouse IV, Nov 27 2017
a(n) = A013928(A008864(n)). - Ridouane Oudra, Oct 15 2019
From Gus Wiseman, Dec 08 2024: (Start)
a(n) = A112929(n) + 1.
a(n+1) - a(n) = A373198(n) = A061398(n) - 1.
(End)

A378086 Number of nonsquarefree numbers < prime(n).

Original entry on oeis.org

0, 0, 1, 1, 3, 4, 5, 6, 7, 11, 11, 13, 14, 14, 16, 20, 22, 23, 25, 26, 27, 29, 31, 33, 36, 39, 39, 40, 41, 42, 49, 50, 53, 53, 57, 58, 61, 63, 64, 68, 70, 71, 74, 75, 76, 77, 81, 84, 86, 87, 88, 90, 91, 97, 99, 101, 103, 104, 107, 109, 109, 113, 119, 120, 121
Offset: 1

Views

Author

Gus Wiseman, Dec 04 2024

Keywords

Examples

			The nonsquarefree numbers counted under each term begin:
  n=1: n=2: n=3: n=4: n=5: n=6: n=7: n=8: n=9: n=10: n=11: n=12:
  --------------------------------------------------------------
   .    .    4    4    9    12   16   18   20   28    28    36
                       8    9    12   16   18   27    27    32
                       4    8    9    12   16   25    25    28
                            4    8    9    12   24    24    27
                                 4    8    9    20    20    25
                                      4    8    18    18    24
                                           4    16    16    20
                                                12    12    18
                                                9     9     16
                                                8     8     12
                                                4     4     9
                                                            8
                                                            4
		

Crossrefs

For nonprime numbers we have A014689.
Restriction of A057627 to the primes.
First-differences are A061399 (zeros A068361), squarefree A061398 (zeros A068360).
For composite instead of squarefree we have A065890.
For squarefree we have A071403, differences A373198.
Greatest is A378032 (differences A378034), restriction of A378033 (differences A378036).
A000040 lists the primes, differences A001223, seconds A036263.
A005117 lists the squarefree numbers.
A013929 lists the nonsquarefree numbers, differences A078147, seconds A376593.
A070321 gives the greatest squarefree number up to n.
A112925 gives the greatest squarefree number between primes, differences A378038.
A112926 gives the least squarefree number between primes, differences A378037.
A120327 gives the least nonsquarefree number >= n, first-differences A378039.
A377783 gives the least nonsquarefree > prime(n), differences A377784.

Programs

  • Mathematica
    Table[Length[Select[Range[Prime[n]],!SquareFreeQ[#]&]],{n,100}]
  • Python
    from math import isqrt
    from sympy import prime, mobius
    def A378086(n): return (p:=prime(n))-sum(mobius(k)*(p//k**2) for k in range(1,isqrt(p)+1)) # Chai Wah Wu, Dec 05 2024

Formula

a(n) = A057627(prime(n)).

A107078 Whether n has non-unitary prime divisors.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0
Offset: 1

Views

Author

Paul Barry, May 10 2005

Keywords

Comments

Also the characteristic function of the numbers that are not squarefree: A013929. - Enrique Pérez Herrero, Jul 08 2012
The sequence of partial sums of this sequence is A057627. - Jason Kimberley, Feb 01 2017

Crossrefs

Programs

  • Maple
    seq(1 - abs(numtheory:-mobius(n)), n = 1..101); # Peter Luschny, Jul 27 2023
  • Mathematica
    Table[1-MoebiusMu[n]^2,{n,1,100}] (* Enrique Pérez Herrero, Jul 08 2012 *)
  • Python
    from sympy import mobius
    def A107078(n): return int(not mobius(n)) # Chai Wah Wu, Dec 05 2024

Formula

a(n) = 1 if A056170(n)>0, 0 otherwise.
a(n) = A107079(n) - A013928(n+1).
a(n) = 1 - A008966(n). - Reinhard Zumkeller, Oct 03 2008
a(n) = Sum_{k=0..n-1} (mu(n-k-1) mod 2) - Sum_{k=0..n-1} (mu(n-k) mod 2).
a(n) = abs(mu(n) - (-1)^omega(n)) = (mu(n) - (-1)^omega(n))^2 = abs(A008683(n) - (-1)^A001221(n)). - Enrique Pérez Herrero, Apr 28 2012
a(n) = 1 - mu(n)^2. - Enrique Pérez Herrero, Jul 08 2012
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1 - 6/Pi^2 (A229099). - Amiram Eldar, Jul 24 2022

A378040 Union of A377783(n) = least nonsquarefree number > prime(n).

Original entry on oeis.org

4, 8, 12, 16, 18, 20, 24, 32, 40, 44, 48, 54, 60, 63, 68, 72, 75, 80, 84, 90, 98, 104, 108, 112, 116, 128, 132, 140, 150, 152, 160, 164, 168, 175, 180, 184, 192, 196, 198, 200, 212, 224, 228, 232, 234, 240, 242, 252, 260, 264, 270, 272, 279, 284, 294, 308, 312
Offset: 1

Views

Author

Gus Wiseman, Nov 20 2024

Keywords

Comments

Numbers k such that, if p is the greatest prime < k, all numbers from p to k (exclusive) are squarefree.

Crossrefs

For squarefree we have A112926 (diffs A378037), opposite A112925 (diffs A378038).
For prime-power instead of nonsquarefree we have A345531, differences A377703.
Union of A377783 (diffs A377784), restriction of A120327 (diffs A378039).
Nonsquarefree numbers not appearing are A378084, see also A378082, A378083.
A000040 lists the primes, differences A001223, seconds A036263.
A005117 lists the squarefree numbers.
A013929 lists the nonsquarefree numbers, differences A078147, seconds A376593.
A061398 counts squarefree numbers between primes, zeros A068360.
A061399 counts nonsquarefree numbers between primes, zeros A068361.
A070321 gives the greatest squarefree number up to n.
A071403(n) = A013928(prime(n)) counts squarefree numbers up to prime(n).
A378086(n) = A057627(prime(n)) counts nonsquarefree numbers up to prime(n).
Cf. A378034 (differences of A378032), restriction of A378036 (differences A378033).

Programs

  • Mathematica
    Union[Table[NestWhile[#+1&,Prime[n],SquareFreeQ],{n,100}]]
    lns[p_]:=Module[{k=p+1},While[SquareFreeQ[k],k++];k]; Table[lns[p],{p,Prime[Range[70]]}]//Union (* Harvey P. Dale, Jun 12 2025 *)
Showing 1-10 of 38 results. Next