A384252 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 power of 2.
1, 2, 2, 4, 4, 4, 6, 8, 8, 8, 10, 8, 12, 12, 8, 16, 16, 16, 18, 16, 12, 20, 22, 16, 24, 24, 18, 24, 28, 16, 30, 32, 20, 32, 24, 32, 36, 36, 24, 32, 40, 24, 42, 40, 32, 44, 46, 32, 48, 48, 32, 48, 52, 36, 40, 48, 36, 56, 58, 32, 60, 60, 48, 64, 48, 40, 66, 64, 44
Offset: 1
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
f[p_, e_] := p^e*(1 - 1/p^(2^(IntegerExponent[e, 2]))); f[2, e_] := 2^e; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
-
PARI
a(n) = {my(f = factor(n)); n * prod(i = 1, #f~, if(f[i,1] == 2, 1, (1 - 1/f[i,1]^(1 << valuation(f[i,2], 2)))));}