Eric J. Van der Velden on Mon, 07 May 2018 23:16:22 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: How to find teichmuller representation of 2 (for example) |
* Eric J. Van der Velden [2018-05-07 22:18]:
> In Z5 I found the teichmuller representatives
> 0
> 1
> i=2121...
> -i=3323...
> -1
>
> By 2121... I mean 2+1*5+2*5^2+1*5^3+...
>
> I can write
> 2 = i(-1)(-i)0... = i - 5 - i*5^2 + 0*5^3 + ...
>
> How can I find in gp this representation of 2 ?
f(x, n, p = 5) =
{ my (v,w);
v = vector(p, i, teichmuller(i-1 + O(p^n)));
w = vector(n);
for (i = 1, n, w[i] = x % p; x = (x - v[w[i]+1]) / p);
w;
}
? f(2, 20) \\ 20 "digits"
%1 = [2, 4, 3, 0, 4, 2, 4, 4, 1, 2, 2, 4, 0, 3, 4, 3, 3, 1, 2, 4]
Cheers,
K.B.
--
Karim Belabas, IMB (UMR 5251) Tel: (+33) (0)5 40 00 26 17
Universite de Bordeaux Fax: (+33) (0)5 40 00 21 23
351, cours de la Liberation http://www.math.u-bordeaux.fr/~kbelabas/ Talence (France) http://pari.math.u-bordeaux.
F-33405fr/ [PARI/GP]
`