A129972 a(n) = 2*floor(log_2(n)) + 1.
1, 3, 3, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 7, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13
Offset: 1
Links
- Indranil Ghosh, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A005408.
Cf. A281149 (See the comment section by Charles R Greathouse IV, of this sequence (A129972) ). - Indranil Ghosh, Jan 17 2017
Programs
-
PARI
a(n)=2*floor(log(n)/log(2))+1
-
PARI
a(n)=log(n+.5)\log(2)*2+1 \\ Charles R Greathouse IV, Mar 21 2012
-
PARI
a(n)=2*logint(n,2)+1 \\ Charles R Greathouse IV, Sep 04 2015
Formula
a(n) = Sum_{k=1..n} (-1)^(k-1)*floor(n/k)*mu(k).
Comments