OFFSET
1,2
COMMENTS
n times one more than the trailing 0's in the binary representation of n. - Ralf Stephan, Aug 22 2013
LINKS
FORMULA
G.f.: Sum_{k>=0} 2^k*x^2^k/(1-x^2^k)^2.
Recurrence: a(0) = 0, a(2*n) = 2*a(n) + 2*n, a(2*n+1) = 2*n+1.
Dirichlet g.f.: zeta(s-1)*2^s/(2^s-2). - Ralf Stephan, Jun 17 2007
Mobius transform of A162728, where x/(1-x)^2 = Sum_{n>=1} A162728(n)*x^n/(1+x^n). - Paul D. Hanna, Jul 12 2009
a(n) = A162728(2*n)/phi(2*n), where x/(1-x)^2 = Sum_{n>=1} A162728(n)*x^n/(1+x^n). - Paul D. Hanna, Jul 12 2009
a((2*n-1)*2^p) = (2*n-1)*(p+1)*2^p, p >= 0. Observe that a(2^p) = A001787(p+1). - Johannes W. Meijer, Feb 08 2013
Sum_{k=1..n} a(k) ~ n^2. - Amiram Eldar, Oct 22 2022
a(n) = Sum_{d divides n} d*A048298(n/d); that is, a(n) is the Dirichlet product of A048298(n) and A000027(n). - Peter Bala, Jan 02 2024
MAPLE
nmax:=63: for p from 0 to ceil(simplify(log[2](nmax))) do for n from 1 to ceil(nmax/(p+2)) do a((2*n-1)*2^p) := (2*n-1)*(p+1)*2^p od: od: seq(a(n), n=1..nmax); # Johannes W. Meijer, Feb 08 2013
# second Maple program:
a:= n-> n*padic[ordp](2*n, 2):
seq(a(n), n=1..63); # Alois P. Heinz, Jan 02 2024
MATHEMATICA
Table[ Part[ Flatten[ FactorInteger[(2 n)^n]], 2], {n, 1, 124}]
Table[IntegerExponent[(2n)^n, 2], {n, 70}] (* Harvey P. Dale, Sep 11 2015 *)
PROG
(PARI) a(n)=n*(valuation(n, 2)+1)
(PARI) a(n)=if(n<1, 0, if(n%2==0, 2*a(n/2)+n, n))
(Magma) [n*(Valuation(n, 2)+1): n in [1..80]]; // Vincenzo Librandi, May 16 2013
(Python)
def A091512(n): return n*(n&-n).bit_length() # Chai Wah Wu, Jul 11 2022
CROSSREFS
KEYWORD
nonn,mult,easy
AUTHOR
Ralf Stephan and Labos Elemer, Jan 18 2004
STATUS
approved