login
A375849
The maximum odd exponent in the prime factorization of n!.
2
1, 1, 3, 3, 1, 1, 7, 7, 1, 1, 5, 5, 11, 11, 15, 15, 3, 3, 1, 9, 19, 19, 3, 3, 23, 23, 25, 25, 7, 7, 31, 31, 15, 15, 17, 17, 35, 35, 9, 9, 39, 39, 41, 41, 21, 21, 3, 3, 47, 47, 49, 49, 3, 13, 53, 53, 27, 27, 9, 9, 57, 57, 63, 63, 31, 31, 31, 15, 67, 67, 11, 11
OFFSET
2,3
COMMENTS
The sequence of indices of record values, 2, 4, 8, 14, 16, 22, 26, 28, 32, 38, ..., are the odious numbers (A000069) multiplied by 2 (A128309).
FORMULA
a(n) = A375032(n!).
max(a(n), A375850(n)) = A011371(n).
MATHEMATICA
a[n_] := Max[Select[FactorInteger[n!][[;; , 2]], OddQ]]; Array[a, 100, 2]
PROG
(PARI) a(n) = {my(e = select(x -> (x % 2), factor(n!)[, 2])); if(#e > 0, vecmax(e)); }
(Python)
from collections import Counter
from sympy import factorint
def A375849(n): return max(filter(lambda x: x&1, sum((Counter(factorint(i)) for i in range(2, n+1)), start=Counter()).values())) # Chai Wah Wu, Aug 31 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, Aug 31 2024
STATUS
approved