A030229 Numbers that are the product of an even number of distinct primes.
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
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.
Links
- T. D. Noe, Table of n, a(n) for n = 1..1000
- Debmalya Basak, Nicolas Robles, and Alexandru Zaharescu, Exponential sums over Möbius convolutions with applications to partitions, arXiv:2312.17435 [math.NT], 2023. Mentions this sequence.
- S. Ramanujan, Irregular numbers, J. Indian Math. Soc. 5 (1913) 105-106.
- Eric Weisstein's World of Mathematics, Prime Factor
- Eric Weisstein's World of Mathematics, Moebius Function
- Eric Weisstein's World of Mathematics, Prime Sums
- H. S. Wilf, A Greeting; and a view of Riemann's Hypothesis, Amer. Math. Monthly, 94:1 (1987), 3-6.
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
Comments