login
A323332
The Dedekind psi function values of the powerful numbers, A001615(A001694(n)).
5
1, 6, 12, 12, 24, 30, 36, 48, 72, 56, 96, 144, 108, 180, 216, 132, 150, 192, 288, 182, 336, 360, 432, 360, 324, 384, 576, 306, 648, 392, 380, 672, 720, 864, 672, 792, 900, 768, 552, 1152, 750, 1296, 1080, 1092, 972, 1344, 1440, 870, 1728, 2160, 992, 1584
OFFSET
1,2
COMMENTS
The sum of the reciprocals of all the terms of this sequence is Pi^2/6 (A013661).
LINKS
Eckford Cohen, A property of Dedekind's psi-function, Proceedings of the American Mathematical Society, Vol. 12, No. 6 (1961), p. 996.
MATHEMATICA
psi[1]=1; psi[n_] := n * Times@@(1+1/Transpose[FactorInteger[n]][[1]]); psi /@ Join[{1}, Select[Range@ 1200, Min@ FactorInteger[#][[All, 2]] > 1 &]] (* after T. D. Noe at A001615 and Harvey P. Dale at A001694 *)
PROG
(Python)
from math import isqrt, prod
from sympy import mobius, integer_nthroot, primefactors
def A323332(n):
def squarefreepi(n): return int(sum(mobius(k)*(n//k**2) for k in range(1, isqrt(n)+1)))
def bisection(f, kmin=0, kmax=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
def f(x):
c, l = n+x-squarefreepi(integer_nthroot(x, 3)[0]), 0
j = isqrt(x)
while j>1:
k2 = integer_nthroot(x//j**2, 3)[0]+1
w = squarefreepi(k2-1)
c -= j*(w-l)
l, j = w, isqrt(x//k2**3)
return c+l
a = primefactors(m:=bisection(f, n, n))
return m*prod(p+1 for p in a)//prod(a) # Chai Wah Wu, Sep 14 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar, Jan 11 2019
STATUS
approved