login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A128474
Largest number k such that 2^k divides n*(n-3)!.
0
0, 2, 1, 2, 3, 6, 4, 5, 7, 9, 8, 9, 10, 14, 11, 12, 15, 17, 16, 17, 18, 21, 19, 20, 22, 24, 23, 24, 25, 30, 26, 27, 31, 33, 32, 33, 34, 37, 35, 36, 38, 40, 39, 40, 41, 45, 42, 43, 46, 48, 47, 48, 49, 52, 50, 51, 53, 55, 54, 55, 56, 62, 57, 58, 63, 65, 64, 65, 66, 69, 67, 68, 70
OFFSET
3,2
FORMULA
a(n) = A007814(n) + A011371(n-3).
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
Sequence in context: A198123 A106576 A301336 * A108618 A097719 A249050
KEYWORD
nonn
AUTHOR
Douglas Stones (dssto1(AT)student.monash.edu.au), May 06 2007
STATUS
approved