OFFSET
0,3
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
FORMULA
MATHEMATICA
Table[n(n+1)-DigitCount[n, 2, 1], {n, 0, 50}] (* Harvey P. Dale, Jul 13 2013 *)
PROG
(PARI) a(n)=n*(n+1) - subst(Pol(binary(n)), x, 1)
(Magma) [n^2 + Valuation(Factorial(n), 2): n in [0..60]]; // Vincenzo Librandi, Jun 12 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Oct 27 2007
STATUS
approved