login
Largest number k such that 2^k divides n*(n-3)!.
0

%I #7 May 23 2024 04:28:14

%S 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,

%T 24,25,30,26,27,31,33,32,33,34,37,35,36,38,40,39,40,41,45,42,43,46,48,

%U 47,48,49,52,50,51,53,55,54,55,56,62,57,58,63,65,64,65,66,69,67,68,70

%N Largest number k such that 2^k divides n*(n-3)!.

%F a(n) = A007814(n) + A011371(n-3).

%t a[n_] := IntegerExponent[n, 2] + n - 3 - DigitCount[n - 3, 2, 1]; Array[a, 100, 3] (* _Amiram Eldar_, May 23 2024 *)

%o (PARI) a(n) = valuation(n, 2) + n - 3 - hammingweight(n-3); \\ _Amiram Eldar_, May 23 2024

%Y Cf. A007814, A011371.

%K nonn

%O 3,2

%A Douglas Stones (dssto1(AT)student.monash.edu.au), May 06 2007