# how to solve the errorOverflowError: cannot fit 'long' into an index-sized integer 122

The following code of elliptic curve gives me above error.

```
p =2^31-1 # prime number
k.<a> = FiniteField (p^2) ; Finite Field in a of size 2147483647^2
R.<z> = k[];R#PolynomialRing(k);Univariate Polynomial Ring in z over Finite Field in a of size 2147483647^2
```

i have computed from my code B1

```
B1 = 858993459*a + 429496730
```

I want to compute

```
x= R(B_1*z+(B_1*z)^p);X
```

but it gives me above error how to solve it for large prime number.**strong text**

add a comment