A249151 Largest m such that m! divides the product of elements on row n of Pascal's triangle: a(n) = A055881(A001142(n)).
Examples
Binomial coeff. Their product Largest k! A007318 A001142(n) which divides Row 0 1 1 1! Row 1 1 1 1 1! Row 2 1 2 1 2 2! Row 3 1 3 3 1 9 1! Row 4 1 4 6 4 1 96 4! (96 = 4*24) Row 5 1 5 10 10 5 1 2500 2! (2500 = 1250*2) Row 6 1 6 15 20 15 6 1 162000 6! (162000 = 225*720)
Links
- Chai Wah Wu, Table of n, a(n) for n = 0..10000 (terms 0..4096 from Antti Karttunen)
Crossrefs
Programs
-
PARI
A249151(n) = { my(uplim,padicvals,b); uplim = (n+3); padicvals = vector(uplim); for(k=0, n, b = binomial(n, k); for(i=1, uplim, padicvals[i] += valuation(b, prime(i)))); k = 1; while(k>0, for(i=1, uplim, if((padicvals[i] -= valuation(k, prime(i))) < 0, return(k-1))); k++); }; \\ Alternative implementation: A001142(n) = prod(k=1, n, k^((k+k)-1-n)); A055881(n) = { my(i); i=2; while((0 == (n%i)), n = n/i; i++); return(i-1); } A249151(n) = A055881(A001142(n)); for(n=0, 4096, write("b249151.txt", n, " ", A249151(n)));
-
Python
from itertools import count from collections import Counter from math import comb from sympy import factorint def A249151(n): p = sum((Counter(factorint(comb(n,i))) for i in range(n+1)),start=Counter()) for m in count(1): f = Counter(factorint(m)) if not f<=p: return m-1 p -= f # Chai Wah Wu, Aug 19 2025
-
Scheme
(define (A249151 n) (A055881 (A001142 n)))
Comments