Bill Allombert on Fri, 07 Nov 2014 11:36:39 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Cube roots mod prime powers |
On Fri, Nov 07, 2014 at 12:03:11AM -0500, Charles Greathouse wrote: > Is there a way to find cube roots mod prime powers, rather than just > primes? Modular roots are handled by gen_Shanks_sqrtn, which is quite > specific to primes, but I don't know if there's away to do Hensel lifting > other than 'by hand'. Use sqrtn and t_PADIC: ? sqrtn(17+O(5^10),3) %2 = 3+4*5+2*5^2+4*5^3+4*5^4+4*5^5+5^6+5^7+2*5^8+3*5^9+O(5^10) > Also, is there a way to get Fp_sqrtn's *zeta from gp? gpow just throws it > away, but it would be nice to know what the other roots were. (At the > moment I'm using ./gp-sta because I'm on a temporary system rather than my > usual setup, so solutions that don't use install() would be best. I'm not > even sure if you can access that sort of parameter with install, though.) Again, use sqrtn: ? sqrtn(Mod(2,31),3,&z) %7 = Mod(4,31) ? z %8 = Mod(25,31) Cheers, Bill.