A375850 The maximum even exponent in the prime factorization of n!, or 0 if no such exponent exists.
0, 0, 0, 0, 0, 0, 4, 4, 2, 4, 8, 8, 10, 10, 2, 6, 6, 6, 16, 16, 18, 18, 4, 4, 22, 22, 10, 6, 6, 6, 26, 26, 14, 4, 32, 32, 34, 34, 8, 18, 38, 38, 6, 6, 6, 10, 42, 42, 46, 46, 22, 12, 12, 12, 50, 50, 26, 4, 54, 54, 56, 56, 28, 30, 30, 30, 64, 64, 66, 66, 32, 32, 70
Offset: 0
Links
Programs
-
Mathematica
a[n_] := Max[0, Max[Select[FactorInteger[n!][[;; , 2]], EvenQ]]]; Array[a, 100, 0]
-
PARI
a(n) = {my(e = select(x -> !(x % 2), factor(n!)[, 2])); if(#e == 0, 0, vecmax(e));}
-
Python
from collections import Counter from sympy import factorint def A375850(n): return max(filter(lambda x: x&1^1,sum((Counter(factorint(i)) for i in range(2,n+1)),start=Counter()).values()),default=0) # Chai Wah Wu, Aug 31 2024
Comments