OFFSET
3,2
MATHEMATICA
a[n_] := IntegerExponent[n, 2] + n - 3 - DigitCount[n - 3, 2, 1]; Array[a, 100, 3] (* Amiram Eldar, May 23 2024 *)
PROG
(PARI) a(n) = valuation(n, 2) + n - 3 - hammingweight(n-3); \\ Amiram Eldar, May 23 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Douglas Stones (dssto1(AT)student.monash.edu.au), May 06 2007
STATUS
approved