OFFSET
1,2
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)
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
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.
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
EXAMPLE
(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,...
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 *)
PROG
(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
(Haskell)
import Data.List (elemIndices)
a030229 n = a030229_list !! (n-1)
a030229_list = map (+ 1) $ elemIndices 1 a008683_list
-- Reinhard Zumkeller, Dec 27 2012
(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
CROSSREFS
KEYWORD
nonn,easy,nice
AUTHOR
STATUS
approved