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.

A030229 Numbers that are the product of an even number of distinct primes.

Original entry on oeis.org

1, 6, 10, 14, 15, 21, 22, 26, 33, 34, 35, 38, 39, 46, 51, 55, 57, 58, 62, 65, 69, 74, 77, 82, 85, 86, 87, 91, 93, 94, 95, 106, 111, 115, 118, 119, 122, 123, 129, 133, 134, 141, 142, 143, 145, 146, 155, 158, 159, 161, 166, 177, 178, 183, 185, 187, 194, 201, 202, 203, 205, 206, 209, 210, 213, 214
Offset: 1

Views

Author

Keywords

Comments

These are the positive integers k with moebius(k) = 1 (cf. A008683). - N. J. A. Sloane, May 18 2021
From Enrique Pérez Herrero, Jul 06 2012: (Start)
This sequence and A030059 form a partition of the squarefree numbers set: A005117.
Also solutions to equation mu(n)=1.
Sum_{n>=1} 1/a(n)^s = (Zeta(s)^2 + Zeta(2*s))/(2*Zeta(s)*Zeta(2*s)).
(End)
A008683(a(n)) = 1; a(A220969(n)) mod 2 = 0; a(A220968(n)) mod 2 = 1. - Reinhard Zumkeller, Dec 27 2012
Characteristic function for values of a(n) = (mu(n)+1)! - 1, where mu(n) is the Mobius function (A008683). - Wesley Ivan Hurt, Oct 11 2013
Conjecture: For the matrix M(i,j) = 1 if j|i and 0 otherwise, Inverse(M)(a,1) = -1, for any a in this sequence. - Benedict W. J. Irwin, Jul 26 2016
Solutions to the equation Sum_{d|n} mu(d)*d = Sum_{d|n} mu(n/d)*d. - Torlach Rush, Jan 13 2018
Solutions to the equation Sum_{d|n} mu(d)*sigma(d) = n, where sigma(n) is the sum of divisors function (A000203). - Robert D. Rosales, May 20 2024
From Peter Munn, Oct 04 2019: (Start)
Numbers n such that omega(n) = bigomega(n) = 2*k for some integer k.
The squarefree numbers in A000379.
The squarefree numbers in A028260.
This sequence is closed with respect to the commutative binary operation A059897(.,.), thus it forms a subgroup of the positive integers under A059897(.,.). A006094 lists a minimal set of generators for this subgroup. The lexicographically earliest ordered minimal set of generators is A100484 with its initial 4 removed.
(End)
The asymptotic density of this sequence is 3/Pi^2 (cf. A104141). - Amiram Eldar, May 22 2020

Examples

			(empty product), 2*3, 2*5, 2*7, 3*5, 3*7, 2*11, 2*13, 3*11, 2*17, 5*7, 2*19, 3*13, 2*23,...
		

References

  • B. C. Berndt and R. A. Rankin, Ramanujan: Letters and Commentary, see p. 23; AMS Providence RI 1995
  • S. Ramanujan, Collected Papers, pp. xxiv, 21.

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a030229 n = a030229_list !! (n-1)
    a030229_list = map (+ 1) $ elemIndices 1 a008683_list
    -- Reinhard Zumkeller, Dec 27 2012
    
  • Maple
    a := n -> `if`(numtheory[mobius](n)=1,n,NULL); seq(a(i),i=1..214); # Peter Luschny, May 04 2009
    with(numtheory); t := [ ]: f := [ ]: for n from 1 to 250 do if mobius(n) = 1 then t := [ op(t), n ] else f := [ op(f), n ]; fi; od: t; # Wesley Ivan Hurt, Oct 11 2013
    # alternative
    A030229 := proc(n)
        option remember;
        local a;
        if n = 1 then
            1;
        else
            for a from procname(n-1)+1 do
                if numtheory[mobius](a) = 1 then
                    return a;
                end if;
            end do:
        end if;
    end proc:
    seq(A030229(n),n=1..40) ; # R. J. Mathar, Sep 22 2020
  • Mathematica
    Select[Range[214], MoebiusMu[#] == 1 &] (* Jean-François Alcover, Oct 04 2011 *)
  • PARI
    isA030229(n)= #(n=factor(n)[,2]) % 2 == 0 && (!n || vecmax(n)==1 )
    
  • PARI
    is(n)=moebius(n)==1 \\ Charles R Greathouse IV, Jan 31 2017
    for(n=1,500, isA030229(n)&print1(n",")) \\ M. F. Hasler
    
  • Python
    from math import isqrt, prod
    from sympy import primerange, integer_nthroot, primepi
    def A030229(n):
        def g(x,a,b,c,m): yield from (((d,) for d in enumerate(primerange(b+1,isqrt(x//c)+1),a+1)) if m==2 else (((a2,b2),)+d for a2,b2 in enumerate(primerange(b+1,integer_nthroot(x//c,m)[0]+1),a+1) for d in g(x,a2,b2,c*b2,m-1)))
        def f(x): return int(n-1+x-sum(sum(primepi(x//prod(c[1] for c in a))-a[-1][0] for a in g(x,0,1,1,i)) for i in range(2,x.bit_length(),2)))
        kmin, kmax = 0,1
        while f(kmax) > kmax:
            kmax <<= 1
        while kmax-kmin > 1:
            kmid = kmax+kmin>>1
            if f(kmid) <= kmid:
                kmax = kmid
            else:
                kmin = kmid
        return kmax # Chai Wah Wu, Aug 29 2024

Formula

a(n) < n*Pi^2/3 infinitely often; a(n) > n*Pi^2/3 infinitely often. - Charles R Greathouse IV, Oct 04 2011; corrected Sep 07 2017
{a(n)} = {m : m = A059897(A030059(k), p), k >= 1} for prime p, where {a(n)} denotes the set of integers in the sequence. - Peter Munn, Oct 04 2019