OFFSET
1,2
COMMENTS
Row sums of A103994 (conjectured).
FORMULA
a(n) = 1 + log_2(n), for n = 1, 2, 4, 8, ... and the rest zeros.
Dirichlet g.f.: 1/(1-2^(-s))^2, i.e., Dirichlet convolution of A036987 (right-shifted, assuming offset 1 there) with itself.
Multiplicative with a(2^e) = 1+e, and a(p^e) = 0 for odd primes p and e>=1. Dirichlet convolution square of A209229. - R. J. Mathar, Mar 12 2012
EXAMPLE
a(8) = 4 = sum of row 8 terms of A103994: (1 + 1 + 0 + 1 + 0 + 0 + 0 + 1).
a(8) = 4 = 1 + log_2(8).
MATHEMATICA
a[n_] := Module[{e = IntegerExponent[n, 2]}, If[n == 2^e, e+1, 0]]; Array[a, 100] (* Amiram Eldar, Aug 31 2023 *)
PROG
(PARI) a(n)=direuler(p=1, n, if(p==2, 1/(1-X)^2, 1))[n] /* Ralf Stephan, Mar 28 2015 */
(PARI) a(n)=if(n==2^valuation(n, 2), valuation(n, 2)+1, 0) /* Ralf Stephan, Mar 28 2015 */
CROSSREFS
KEYWORD
nonn,easy,mult
AUTHOR
Gary W. Adamson, Apr 15 2007
EXTENSIONS
More terms and better name from Ralf Stephan, Mar 28 2015
STATUS
approved