A384250 The number of integers k from 1 to n such that the greatest divisor of k that is an infinitary divisor of n is a powerful number.
1, 1, 2, 4, 4, 2, 6, 6, 9, 4, 10, 8, 12, 6, 8, 16, 16, 9, 18, 16, 12, 10, 22, 12, 25, 12, 21, 24, 28, 8, 30, 18, 20, 16, 24, 36, 36, 18, 24, 24, 40, 12, 42, 40, 36, 22, 46, 32, 49, 25, 32, 48, 52, 21, 40, 36, 36, 28, 58, 32, 60, 30, 54, 64, 48, 20, 66, 64, 44
Offset: 1
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
f[p_, e_] := If[EvenQ[e], p^e, p^e*(1 - 1/p + 1/p^(2^IntegerExponent[e-1, 2]))]; f[p_, 1] := p-1; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
-
PARI
a(n) = {my(f = factor(n)); prod(i = 1, #f~, if(f[i,2] == 1, f[i,1]-1, f[i,1]^f[i,2] * if(!(f[i,2]%2), 1, 1 - 1/f[i,1] + 1/f[i,1]^(1 << valuation(f[i,2]-1, 2)))));}
Formula
Multiplicative with a(p^e) = p^e if e is even, a(p) = p-1, and a(p^e) = p^e * (1 - 1/p + 1/p^A006519(e-1)) if e is odd >= 3.
Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = Product_{p prime} f(1/p) = 0.7218055778498707651047..., and f(x) = (1 + x - x^2)/(1 + x) + (1 - x) * Sum_{k>=2} x^(2^k + 1) / (1 - x^(2^k));