A048109 Numbers having equally many squarefree and nonsquarefree divisors; number of unitary divisors of n (A034444) = number of non-unitary divisors of n (A048105).
8, 24, 27, 40, 54, 56, 88, 104, 120, 125, 135, 136, 152, 168, 184, 189, 232, 248, 250, 264, 270, 280, 296, 297, 312, 328, 343, 344, 351, 375, 376, 378, 408, 424, 440, 456, 459, 472, 488, 513, 520, 536, 552, 568, 584, 594, 616, 621, 632, 664, 680, 686, 696
Offset: 1
Keywords
Examples
n = 88 = 2*2*2*11 has 8 divisors, of which 4 are unitary divisors (because of 2 distinct prime factors) and 4 are nonunitary divisors: U={1,88,11,8} and NU = {2,44,4,22}.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
filter:= proc(n) local F; F:= ifactors(n)[2]; mul(t[2]+1,t=F) = 2^(1+nops(F)) end proc; select(filter, [$1..1000]); # Robert Israel, Jun 09 2015
-
Mathematica
Position[Table[FiniteAbelianGroupCount[n], {n, 1, 1000}],3] // Flatten (* Geoffrey Critzer, Jun 09 2015 *)
-
PARI
is(n)=select(e->e>1, factor(n)[,2])==[3]~ \\ Charles R Greathouse IV, Jun 10 2015
-
PARI
isok(n) = sumdiv(n, d, issquarefree(d)) == sumdiv(n, d, !issquarefree(d)); \\ Michel Marcus, Jun 24 2015
-
Python
from math import isqrt from sympy import mobius, primerange def A048109(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(3,x.bit_length())) for p in primerange(isqrt(x)+1))) return bisection(f,n,n) # Chai Wah Wu, Feb 24 2025
Formula
Extensions
New name based on comment by Ivan Neretin, Jun 19 2015
Comments