The p-adic valuation for Pascal's triangle row
by fungarwai, Dec 25, 2018, 11:07 PM
Here we discuss for different values of m when with fixed integer n and prime p
Let , consider with Kummer's theorem
When the number of carry is 0, take , there are different values of ,
Totally, there are different values of m
Specially when p=2, there are different values of m
When the number of carry is 1, suppose the carry take place at ,
,
,
there are different values of and different values of
For each k, there are different values of m
Totally, there are different values of m
Specially when p=2, there are totally different values of m
Example
General Formula
There is a general formula suggested by William B. Everett.
NUMBER OF BINOMIAL COEFFICIENTS DIVISIBLE BY A FIXED POWER OF A PRIME
where
Python program for general cases
input values for n, p, nu to get the number of values of m where
Let , consider with Kummer's theorem
When the number of carry is 0, take , there are different values of ,
Totally, there are different values of m
Specially when p=2, there are different values of m
When the number of carry is 1, suppose the carry take place at ,
,
,
there are different values of and different values of
For each k, there are different values of m
Totally, there are different values of m
Specially when p=2, there are totally different values of m
Example
For example, look for when n=7,8,9
1,7,21,35,35,21,7,1
1,8,28,56,70,56,28,8,1
1,9,36,84,126,126,84,36,9,1
When
There are values of m for
There are values of m for
When
There are values of m for
There are values of m for
When
There are values of m for
There are 2 values of m for
How many integer number such that ?
https://artofproblemsolving.com/community/c4h2566693
1,7,21,35,35,21,7,1
1,8,28,56,70,56,28,8,1
1,9,36,84,126,126,84,36,9,1
When
There are values of m for
There are values of m for
When
There are values of m for
There are values of m for
When
There are values of m for
There are 2 values of m for
How many integer number such that ?
https://artofproblemsolving.com/community/c4h2566693
General Formula
There is a general formula suggested by William B. Everett.
NUMBER OF BINOMIAL COEFFICIENTS DIVISIBLE BY A FIXED POWER OF A PRIME
where
Python program for general cases
input values for n, p, nu to get the number of values of m where
import math n = int(input("n=")) p = int(input("p=")) nu = int(input("nu_p=")) N=0 for m in range(0,n+1): s=0 for k in range(0,int(math.log(n,p))+1): s=s+int(n/(p**k))-int(m/(p**k))-int((n-m)/(p**k)) if s==nu: N=N+1 print(N)
[pywindow]
import math
n = int(input("n="))
p = int(input("p="))
nu = int(input("nu_p="))
N=0
for m in range(0,n+1):
s=0
for k in range(0,int(math.log(n,p))+1):
s=s+int(n/(p**k))-int(m/(p**k))-int((n-m)/(p**k))
if s==nu:
N=N+1
print(N)
[/pywindow]
This post has been edited 7 times. Last edited by fungarwai, Aug 21, 2021, 12:45 PM
by rzlng, Dec 25, 2018, 11:14 PM