Re: reversing a series modulo

Bill Allombert <[email protected]>
Newsgroups gmane.comp.mathematics.pari.user
Message-ID <aBi7V1kQq9YCv4Rp@seventeen>
On Sat, May 03, 2025 at 02:38:33PM -0400, Max Alekseyev wrote:
> Hello,
> 
> Reversing a series and taking it modulo 5 works, but not the opposite way
> around. Why?
> 
> ? f = x + x^2 + 4*x^6 + 4*x^7 + x^11 + x^12 + 4*x^16 + 4*x^17 + O(x^21)
> %1 = x + x^2 + 4*x^6 + 4*x^7 + x^11 + x^12 + 4*x^16 + 4*x^17 + O(x^21)
> ? serreverse(f) * Mod(1,5)
> %2 = Mod(1, 5)*x + Mod(4, 5)*x^2 + Mod(2, 5)*x^3 + Mod(4, 5)*x^5 + Mod(4,
> 5)*x^6 + Mod(2, 5)*x^8 + Mod(3, 5)*x^10 + Mod(3, 5)*x^11 + Mod(4, 5)*x^12 +
> Mod(4, 5)*x^17 + Mod(3, 5)*x^18 + O(x^21)
> ? serreverse(f * Mod(1,5))
>   ***   at top-level: serreverse(f*Mod(1,5))
>   ***                 ^----------------------
>   *** serreverse: impossible inverse in Fl_inv: Mod(0, 5).

The formula used by PARI is
g=intformal(1/subst(f',x,g))
which involves division by small primes (when integrating)

What you can do is 

? serreverse(f*(1+O(5^2)))*Mod(1,5)
%34 = Mod(1, 5)*x + Mod(4, 5)*x^2 + Mod(2, 5)*x^3 + Mod(4, 5)*x^5 + Mod(4, 5)*x^6 + Mod(2, 5)*x^8 + Mod(3, 5)*x^10 + Mod(3, 5)*x^11 + Mod(4, 5)*x^12 + Mod(4, 5)*x^17 + Mod(3, 5)*x^18 + O(x^21)

Cheers,
Bill
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.