p=534601 is known
Defining coefficients is redundant , it is to be omitted.

On 12/9/17, slelievre <samuel.lelie...@gmail.com> wrote:
> ----- Original message (slightly reformatted) ----
> I want to find the value of  h0, h1, h2, h3, h4 such that
>
>     (x - a1)*(x - a2)*(x - a3)*(h0 + h1*x^1 + h2*x^2 + h3*x^3 + h4*x^4 +
> x^5)
>
> is equal to
>
>     (x + b)*g2 + (a*x + d)
>
> for some a, b, d, in GF(p).
>
> Below is my code which is unable to solve it
>
>     a, b, d, a1, a2, a3, h0, h1, h2, h3, h4 = var('a b d a1 a2 a3 h0 h1 h2
> h3 h4')
>     RHS = (x - a1)*(x - a2)*(x - a3)*(h0 + h1*x^1 + h2*x^2 + h3*x^3 +
> h4*x^4 + x^5)
>     g2 = x^7 + 74604*x^6 + 351974*x^5 + 18952*x^4 + 148817*x^3 + 256076*x^2
>
> + 168356*x + 278165
>     LHS = (x + b)*g2 + (a*x + d)
>     Coeff = RHS.coefficients(x, sparse=False)
>     print(solve(RHS == LHS, h0, h1, h2, h3, h4))
>
> -----
>
> - What is the value of p that you want to work with?
>   Or is p also an unknown?
>
> - Why do you define "Coeff"? You don't seem to use it.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "sage-support" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/sage-support/EJwZDCyUnjs/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> sage-support+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-support@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-support.
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Madhurima Mukopadhyay
Senior Research Fellow
Applied Statistics Unit
ISI, Kolkata

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to