Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Compute the p-adic valuation for certain integers using the lifting-the-exponent lemma
ResourceFunction["ExponentLift"][x,y,n,p] computes the p-adic integer exponent of xn±yn using the lifting-the-exponent (LTE) lemma for some x and y. |
Find the 7-adic valuation of n=10199+4199:
In[1]:= |
Out[1]= |
Therefore 7 divides n but no other power of 7 does:
In[2]:= |
Out[2]= |
Find the 17-adic valuation of n=19867-2867:
In[3]:= |
Out[3]= |
Therefore 173 divides n and no higher power of 17 does:
In[4]:= |
Out[4]= |
LTE can handle extremely large numbers without computing the exponential form:
In[5]:= |
Out[5]= |
Use PowerMod to verify 195×1710- 25×1710 is a multiple of 1711 but not of 1712 or higher power:
In[6]:= |
Out[6]= |
In[7]:= |
Out[7]= |
The only case when "Difference" and "Sum" fields are both integral is when p=2, 4 divides x-y and x, y and n are all odd numbers:
In[8]:= |
Out[8]= |
In[9]:= |
Out[9]= |
LTE requires that the base of two exponentials are coprime to the prime p:
In[10]:= |
Out[10]= |
In[11]:= |
Out[11]= |
LTE also requires that the prime p divides either the difference or the sum of the first two arguments:
In[12]:= |
Out[12]= |
The following works because 7-18 ≡ -11 ≡ 0 (mod 11):
In[13]:= |
Out[13]= |
Find the least n such that 123n-99n is a multiple of 10920. No brute force method is available to find the solution in the life time of the universe. First let's confirm that 109 is a prime and its coprime relations:
In[14]:= |
Out[14]= |
However, direct usage of LTE is not valid because 123-99 is not a multiple of 109:
In[15]:= |
Out[15]= |
Instead, one finds the least value of k such that 123k-99k is a multiple of 109:
In[16]:= |
Out[18]= |
This means that 109 divides 1236 - 996 and LTE is applicable in this new form 123n-99n=(1236)m-(996)m:
In[19]:= |
Out[19]= |
Therefore the least n=6m is found with least m such that v109((1236)m-(996)m)=19:
In[20]:= |
Out[20]= |
n=6×10919 is the least value such that 10920 divides 123n-99n:
In[21]:= |
Out[21]= |
Wolfram Language 13.0 (December 2021) or above
This work is licensed under a Creative Commons Attribution 4.0 International License