A384251 The number of integers k from 1 to n such that the greatest divisor of k that is an infinitary divisor of n is odd.
1, 1, 3, 3, 5, 3, 7, 4, 9, 5, 11, 9, 13, 7, 15, 15, 17, 9, 19, 15, 21, 11, 23, 12, 25, 13, 27, 21, 29, 15, 31, 16, 33, 17, 35, 27, 37, 19, 39, 20, 41, 21, 43, 33, 45, 23, 47, 45, 49, 25, 51, 39, 53, 27, 55, 28, 57, 29, 59, 45, 61, 31, 63, 48, 65, 33, 67, 51, 69
Offset: 1
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
a[n_] := n * If[OddQ[n], 1, 1 - 1/2^(2^(IntegerExponent[IntegerExponent[n, 2], 2]))]; Array[a, 100]
-
PARI
a(n) = n * if(n%2, 1, (1 - 1/(1 << (1 << valuation(valuation(n, 2), 2)))));