OFFSET
1,1
COMMENTS
k belongs to this sequence iff exactly one prime in its factorization into prime powers has exponent 2 and all the other primes in the factorization have exponent 1, for example 60 = 2^2 * 3 * 5.
Numbers k such that A046660(k) = 1. - Zak Seidov, Nov 14 2012
Numbers that have twice as many unitary divisors as nonunitary divisors, the largest possible ratio for nonsquarefree numbers (i.e., numbers that have nonunitary divisors). - Amiram Eldar, Nov 01 2024
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..5000 from Enrique Pérez Herrero)
Eckford Cohen, Arithmetical notes. VIII. An asymptotic formula of Rényi, Proc. Amer. Math. Soc. 13 (1962), pp. 536-539.
Alfred Rényi, On the density of certain sequences of integers, Publications de l'Institut Mathématique, Vol. 8 (1955), pp. 157-162.
FORMULA
MATHEMATICA
Select[Range[500], PrimeOmega[#] - PrimeNu[#] == 1 &] (* Harvey P. Dale, Sep 08 2011 *)
PROG
(PARI) for(n=1, 279, if(bigomega(n)-omega(n)==1, print1(n, ", ")))
(PARI) is(n)=factorback(factor(n)[, 2])==2 \\ Charles R Greathouse IV, Sep 18 2015
(PARI) list(lim)=my(s=lim\4, v=List(), u=vectorsmall(s, i, 1), t, x); forprime(k=2, sqrtint(s), t=k^2; forstep(i=t, s, t, u[i]=0)); forprime(k=2, sqrtint(lim\1), t=k^2; for(i=1, #u, if(u[i] && gcd(k, i)==1, x=t*i; if(x>lim, break); listput(v, x)))); Set(v) \\ Charles R Greathouse IV, Aug 02 2016
(Haskell)
a060687 n = a060687_list !! (n-1)
a060687_list = filter ((== 1) . a046660) [1..]
-- Reinhard Zumkeller, Nov 29 2015
(Python)
from math import isqrt
from sympy import mobius, primerange
def A060687(n):
def bisection(f, kmin=0, kmax=1):
while f(kmax) > kmax: kmax <<= 1
kmin = kmax >> 1
while kmax-kmin > 1:
kmid = kmax+kmin>>1
if f(kmid) <= kmid:
kmax = kmid
else:
kmin = kmid
return kmax
def g(x): return sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))
def f(x): return int(n+x+sum(sum(g(x//p**j) if j&1 else -g(x//p**j) for j in range(2, x.bit_length())) for p in primerange(isqrt(x)+1)))
return bisection(f, n, n) # Chai Wah Wu, Feb 24 2025
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ahmed Fares (ahmedfares(AT)my-deja.com), Apr 19 2001
EXTENSIONS
Corrected and extended by Vladeta Jovovic, Jul 05 2001
STATUS
approved