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.

Previous Showing 71-80 of 104 results. Next

A342450 a(n) is the numerator of the Schnirelmann density of the n-free numbers.

Original entry on oeis.org

53, 157, 145, 3055, 6165, 234331, 584879, 2599496, 48785015, 292856489, 854612603, 12206236915, 8392400925, 183100803621, 1296977891119, 15258697717317, 2997253335821, 79472769236347, 556309528064071, 5960463317677243, 25033951904190895, 46938653648975843, 3099441423652148001
Offset: 2

Views

Author

Amiram Eldar, Mar 12 2021

Keywords

Comments

k-free numbers are numbers whose exponents in their prime factorization are all less than k. E.g., the squarefree numbers (k=2, A005117), the cubefree numbers (k=3, A004709) and the biquadratefree numbers (k=4, A046100).
Let Q_k(m) be the number of k-free numbers not exceeding m. The Schnirelmann density for k-free numbers is d(k) = inf_{m>=1} Q_k(m)/m.
a(2) was found by Rogers (1964).
a(3)-a(6) were found by Orr (1969).
a(7)-a(75) were found by Hardy (1979).

Examples

			The fractions begin with 53/88, 157/189, 145/157, 3055/3168, 6165/6272, 234331/236288, 584879/587264, 2599496/2604717, 48785015/48833536, 292856489/293001216, ...
		

References

  • József Sándor, Dragoslav S. Mitrinovic and Borislav Crstici, Handbook of Number Theory I, Springer Science & Business Media, 2005, Chapter VI, p. 217.

Crossrefs

Cf. A013928, A336025, A342451 (denominators), A342452.

Formula

Let d(n) = a(n)/A342451(n), and let D(n) = 1/zeta(n), the asymptotic density of the n-free numbers. Then:
Lim_{n->oo} d(n) = 1.
d(n) < D(n) (Stark, 1966).
d(n) < D(n) < d(n+1) < D(n+1) (Duncan, 1965; Erdős et al., 1978).
d(n) > 1 - Sum_{p prime} 1/p^n (Duncan, 1969).
(D(n+1)-d(n+1))/(D(n)-d(n)) < 1/2^n (Duncan, 1969).
d(n) > 1 - 1/2^n - 1/3^n - 1/5^n (Diananda and Subbarao, 1977).

A373195 Cardinality of the largest subset of {1,...,n} such that no six distinct elements of this subset multiply to a square.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 8, 8, 9, 9, 10, 10, 10, 10, 11, 12, 13, 13, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 17, 17, 17, 18, 18, 18, 19, 20, 20, 20, 21, 21, 22, 22, 22, 23, 24, 24, 24, 24, 24, 24, 25, 25, 25, 25, 25, 26, 27, 27, 28, 29, 29, 29, 29, 29, 30, 30, 30
Offset: 1

Views

Author

Terence Tao, May 27 2024

Keywords

Comments

a(n) >= A000720(n) + A000720(n/2).
a(n) ~ 3n/2log n (Erdős-Sárközy-Sós). Best bounds currently are due to Pach-Vizer.
a(n+1)-a(n) is either 0 or 1 for any n. (Is equal to 1 when n+1 is prime.)
If "six" is replaced by "one", "two", "three", "four", "five", or "any odd", one obtains A028391, A013928, A372306, A373119, A373178, and A373114 respectively.

Examples

			a(9)=8, because {1,2,3,4,5,7,8,9} does not contain six distinct elements that multiply to a square, but {1,2,3,4,5,6,7,8,9} has 1*2*3*4*6*9 = 36^2.
		

Crossrefs

Programs

  • Python
    from math import isqrt
    def is_square(n):
        return isqrt(n) ** 2 == n
    def precompute_tuples(N):
        tuples = []
        for i in range(1, N + 1):
            for j in range(i + 1, N + 1):
                for k in range(j + 1, N + 1):
                    for l in range(k + 1, N + 1):
                        for m in range(l + 1, N + 1):
                            for n in range(m + 1, N + 1):
                                if is_square(i * j * k * l * m * n):
                                    tuples.append((i, j, k, l, m, n))
        return tuples
    def valid_subset(A, tuples):
        set_A = set(A)
        for i, j, k, l, m, n in tuples:
            if i in set_A and j in set_A and k in set_A and l in set_A and m in set_A and n in set_A:
                return False
        return True
    def largest_subset_size(N, tuples):
        from itertools import combinations
        for size in reversed(range(1, N + 1)):
            for subset in combinations(range(1, N + 1), size):
                if valid_subset(subset, tuples):
                    return size
    for N in range(1, 26):
        print(largest_subset_size(N, precompute_tuples(N)))
    
  • Python
    from math import prod
    from itertools import combinations
    from functools import lru_cache
    from sympy.ntheory.primetest import is_square
    @lru_cache(maxsize=None)
    def A373195(n):
        if n==1: return 1
        i = A373195(n-1)+1
        if sum(1 for p in combinations(range(1,n),5) if is_square(n*prod(p))) > 0:
            a = [set(p) for p in combinations(range(1,n+1),6) if is_square(prod(p))]
            for q in combinations(range(1,n),i-1):
                t = set(q)|{n}
                if not any(s<=t for s in a):
                    return i
            else:
                return i-1
        else:
            return i # Chai Wah Wu, May 30 2024

Formula

From David A. Corneth, May 29 2024: (Start)
a(p) = a(p-1) + 1 for prime p.
a(k^2) = a(k^2 - 1) for k >= 3. (End)

Extensions

a(26)-a(27) from Paul Muljadi, May 28 2024
a(28)-a(35) from Michael S. Branicky, May 29 2024
a(36)-a(37) from David A. Corneth, May 29 2024
a(38)-a(69) from Jinyuan Wang, Dec 30 2024

A088609 a(1) = 1, a(n) is the smallest squarefree number not included earlier if n is not squarefree, else n is the smallest nonsquarefree number.

Original entry on oeis.org

1, 4, 8, 2, 9, 12, 16, 3, 5, 18, 20, 6, 24, 25, 27, 7, 28, 10, 32, 11, 36, 40, 44, 13, 14, 45, 15, 17, 48, 49, 50, 19, 52, 54, 56, 21, 60, 63, 64, 22, 68, 72, 75, 23, 26, 76, 80, 29, 30, 31, 81, 33, 84, 34, 88, 35, 90, 92, 96, 37, 98, 99, 38, 39, 100, 104, 108, 41, 112, 116
Offset: 1

Views

Author

Amarnath Murthy, Oct 16 2003

Keywords

Comments

From Antti Karttunen, Jun 04 2014: (Start)
This is a self-inverse permutation (involution) of natural numbers.
After 1, nonsquarefree numbers occur (in monotonic order) at the positions given by squarefree numbers, A005117, and squarefree numbers occur (in monotonic order) at the positions given by their complement, nonsquarefree numbers, A013929.
(End)

Crossrefs

Formula

From Antti Karttunen, Jun 04 2014: (Start)
a(1), and for n>1, if mu(n) = 0, a(n) = A005117(1+A057627(n)), otherwise, a(n) = A013929(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. [A property shared with A243347].
(End)

Extensions

More terms from Ray Chandler, Oct 18 2003

A158819 a(n) = (number of squarefree numbers <= n) minus round(n/zeta(2)).

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 2, 1, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 2, 2, 2, 2, 1, 2, 1, 1, 2, 2, 2, 2, 1, 1, 0, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Daniel Forgues, Mar 27 2009

Keywords

Comments

Race between the number of squarefree numbers and round(n/zeta(2)).
First term < 0: a(172) = -1.

References

  • G. H. Hardy and S. Ramanujan, The normal number of prime factors of a number n, Q. J. Math., 48 (1917), pp. 76-92.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, Fifth edition, Clarendon Press, 1979, pp. 269-270.

Crossrefs

Cf. A008966 (1 if n is squarefree, else 0).
Cf. A013928 (number of squarefree numbers < n).
Cf. A100112 (if n is the k-th squarefree number then k else 0).
Cf. A057627 (number of nonsquarefree numbers not exceeding n).
Cf. A005117 (squarefree numbers).
Cf. A013929 (nonsquarefree numbers).
Cf. A013661 (zeta(2)).

Programs

  • Mathematica
    seq[lim_] := Accumulate[Boole[SquareFreeQ /@ Range[lim]]] - Round[Range[lim]/Zeta[2]]; seq[105] (* Amiram Eldar, Jan 20 2025 *)

Formula

Since zeta(2) = Sum_{i>=1} 1/(i^2) = (Pi^2)/6, we get:
a(n) = A013928(n+1) - n/Sum_{i>=1} 1/(i^2) = O(sqrt(n));
a(n) = A013928(n+1) - 6*n/(Pi^2) = O(sqrt(n)).

A238645 Number of odd primes p < 2*n such that the number of squarefree numbers among 1, ..., ((p-1)/2)*n is prime.

Original entry on oeis.org

0, 1, 2, 1, 2, 2, 1, 2, 2, 5, 2, 3, 3, 1, 6, 5, 3, 3, 1, 4, 2, 4, 4, 3, 4, 2, 4, 3, 1, 4, 3, 3, 7, 5, 4, 5, 5, 4, 3, 2, 5, 2, 2, 4, 5, 4, 9, 7, 4, 3, 2, 4, 3, 4, 3, 2, 4, 6, 5, 6, 4, 4, 2, 2, 7, 5, 6, 6, 8, 3, 7, 3, 5, 6, 10, 6, 6, 6, 4, 5
Offset: 1

Views

Author

Zhi-Wei Sun, Mar 02 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1, and a(n) = 1 only for n = 2, 4, 7, 14, 19, 29.
This is an analog of the conjecture in A237578 for squarefree numbers. We have verified it for n up to 20000.
See also A238646 for a similar conjecture involving squarefree numbers.

Examples

			a(4) = 1 since 3 is prime and there are exactly 3 squarefree numbers among 1, ..., (3-1)/2*4 (namely, 1, 2, 3).
a(14) = 1 since 5 and 17 are both prime, and there are exactly 17 squarefree numbers among 1, ..., (5-1)/2*14.
a(19) = 1 since 3 and 13 are both prime, and there are exactly 13 squarefree numbers among 1, ..., (3-1)/2*19 (namely, 1, 2, 3, 5, 6, 7, 10, 11, 13, 14, 15, 17, 19).
a(29) = 1 since 41 and 353 are both prime, and there are exactly 353 squarefree numbers among 1, ..., (41-1)/2*29 = 580.
		

Crossrefs

Programs

  • Mathematica
    s[n_]:=Sum[If[SquareFreeQ[k],1,0],{k,1,n}]
    a[n_]:=Sum[If[PrimeQ[s[(Prime[k]-1)/2*n]],1,0],{k,2,PrimePi[2n-1]}]
    Table[a[n],{n,1,80}]

A275390 Numbers n for which |n/zeta(2) - Q(n)| sets a new record, where Q(x) is the number of squarefree numbers up to x.

Original entry on oeis.org

1, 2, 3, 6, 7, 15, 23, 39, 42, 43, 115, 223, 231, 239, 474, 719, 1367, 1403, 1406, 1407, 1410, 1411, 1419, 1646, 1659, 1662, 1663, 3423, 8810, 8818, 8819, 8822, 8823, 8915, 9239, 9242
Offset: 1

Views

Author

Keywords

Comments

Assuming the Riemann hypothesis, Vaidya proved that Q(n) = 6*n/Pi^2 + O(n^k) for any k > 2/5.

Crossrefs

Programs

  • PARI
    ct=r=0; for(n=1,1e4, if(issquarefree(n),ct++); t=abs(n/zeta(2)-ct); if(t>r,r=t; print1(n", ")))

A285879 Number of odd squarefree numbers <= n.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 11, 11, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30, 31, 31, 31, 31, 32, 32, 33, 33, 33, 33, 34, 34, 35
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 27 2017

Keywords

Crossrefs

Programs

  • Maple
    ListTools:-PartialSums(map(op,[seq(`if`(numtheory:-issqrfree(n),[1,0],[0,0]),n=1..100,2)])); # Robert Israel, May 07 2018
    seq(add(mobius(2*k)^2, k=1..n), n=1..100); # Ridouane Oudra, Aug 16 2019
  • Mathematica
    Table[Sum[Boole[OddQ[k] && SquareFreeQ[k]], {k, 1, n}], {n, 85}]
    nmax = 85; Rest[CoefficientList[Series[Sum[Boole[OddQ[k] && MoebiusMu[k]^2 == 1] x^k/(1 - x), {k, 1, nmax}], {x, 0, nmax}], x]]
  • PARI
    a(n) = sum(k=1, n, (k%2)*issquarefree(k)); \\ Michel Marcus, Apr 27 2017
    
  • Python
    from sympy.ntheory.factor_ import core
    def a(n): return sum([1 for k in range(1, n + 1) if k%2==1 and core(k)==k]) # Indranil Ghosh, Apr 28 2017

Formula

G.f.: Sum_{k>=1} x^A056911(k)/(1 - x).
a(n) ~ 4*n/Pi^2. See A185199.
a(n) = Sum_{k=1..n} A008683(2k)^2. - Ridouane Oudra, Aug 16 2019

A295101 Number of squarefree sqrt(n)-smooth numbers <= n.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14
Offset: 1

Views

Author

Max Alekseyev, Nov 14 2017

Keywords

Comments

a(n) = number of positive squarefree integers m<=n such that A006530(m) <= sqrt(n).

Crossrefs

Programs

  • Maple
    N:= 200: # for a(1)..a(N)
    V:= Vector(N,1):
    for n from 2 to N do
       if not numtheory:-issqrfree(n) then next fi;
       m:= max(max(numtheory:-factorset(n))^2,n);
       if m <= N then V[m..N]:= map(`+`,V[m..N],1) fi;
    od:
    convert(V,list); # Robert Israel, Mar 24 2020

Formula

a(n) = A013928(n+1) - Sum_{prime p > sqrt(n)} A013928(floor(n/p)+1).
If n is in A295102, then a(n)=a(n-1)+1; if n is in A001248, i.e., n=p^2 for prime p, then a(n)=a(n-1)+A013928(p); otherwise a(n)=a(n-1).

A378615 Number of non prime powers <= prime(n).

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 6, 7, 10, 13, 14, 18, 21, 22, 25, 29, 34, 35, 39, 42, 43, 48, 50, 55, 62, 65, 66, 69, 70, 73, 84, 86, 91, 92, 101, 102, 107, 112, 115, 119, 124, 125, 134, 135, 138, 139, 150, 161, 164, 165, 168, 173, 174, 182, 186, 191, 196, 197, 202, 205
Offset: 1

Views

Author

Gus Wiseman, Dec 06 2024

Keywords

Examples

			The non prime powers counted under each term:
  n=1  n=2  n=3  n=4  n=5  n=6  n=7  n=8  n=9  n=10
  -------------------------------------------------
   1    1    1    6   10   12   15   18   22   28
                  1    6   10   14   15   21   26
                       1    6   12   14   20   24
                            1   10   12   18   22
                                 6   10   15   21
                                 1    6   14   20
                                      1   12   18
                                          10   15
                                           6   14
                                           1   12
                                               10
                                                6
                                                1
		

Crossrefs

Restriction of A356068 (first-differences A143731).
First-differences are A368748.
Maxima are A378616.
Other classes of numbers (instead of non prime powers):
- prime: A000027 (diffs A000012), restriction of A000720 (diffs A010051)
- squarefree: A071403 (diffs A373198), restriction of A013928 (diffs A008966)
- nonsquarefree: A378086 (diffs A061399), restriction of A057627 (diffs A107078)
- prime power: A027883 (diffs A366833), restriction of A025528 (diffs A010055)
- composite: A065890 (diffs A046933), restriction of A065855 (diffs A005171)
A000040 lists the primes, differences A001223
A000961 and A246655 list the prime powers, differences A057820.
A024619 lists the non prime powers, differences A375735, seconds A376599.
A080101 counts prime powers between primes (exclusive), inclusive A366833.
A361102 lists the non powers of primes, differences A375708.

Programs

  • Mathematica
    Table[Length[Select[Range[Prime[n]],Not@*PrimePowerQ]],{n,100}]
  • Python
    from sympy import prime, primepi, integer_nthroot
    def A378615(n): return int((p:=prime(n))-n-sum(primepi(integer_nthroot(p,k)[0]) for k in range(2,p.bit_length()))) # Chai Wah Wu, Dec 07 2024

Formula

a(n) = prime(n) - A027883(n). - Chai Wah Wu, Dec 08 2024

A378618 Sum of nonsquarefree numbers between prime(n) and prime(n+1).

Original entry on oeis.org

0, 4, 0, 17, 12, 16, 18, 20, 104, 0, 68, 40, 0, 89, 199, 110, 60, 127, 68, 72, 151, 161, 172, 278, 297, 0, 104, 108, 112, 849, 128, 403, 0, 579, 150, 461, 322, 164, 680, 351, 180, 561, 192, 196, 198, 819, 648, 449, 228, 232, 470, 240, 1472, 508, 521, 532, 270
Offset: 1

Views

Author

Gus Wiseman, Dec 09 2024

Keywords

Examples

			The nonsquarefree numbers between prime(24) = 89 and prime(25) = 97 are {90, 92, 96}, so a(24) = 278.
		

Crossrefs

For prime instead of nonsquarefree we have A001043.
For composite instead of nonsquarefree we have A054265.
Zeros are A068361.
A000040 lists the primes, differences A001223, seconds A036263.
A070321 gives the greatest squarefree number up to n.
A071403 counts squarefree numbers up to prime(n), restriction of A013928.
A120327 gives the least nonsquarefree number >= n.
A378086 counts nonsquarefree numbers up to prime(n), restriction of A057627.
For squarefree numbers (A005117, differences A076259) between primes:
- length is A061398, zeros A068360
- min is A112926, differences A378037
- max is A112925, differences A378038
- sum is A373197
For nonsquarefree numbers (A013929, differences A078147) between primes:
- length is A061399
- min is A377783 (differences A377784), union A378040
- max is A378032 (differences A378034), restriction of A378033 (differences A378036)
- sum is A378618 (this)

Programs

  • Mathematica
    Table[Total[Select[Range[Prime[n],Prime[n+1]],!SquareFreeQ[#]&]],{n,100}]
Previous Showing 71-80 of 104 results. Next