Thread: Algorithm to compute the k first and last digits of n^n

1. Algorithm to compute the k first and last digits of n^n

Hello !

I'm having trouble with this :

I want to write an algorithm that computes the K first and K last digits of n^n.

I know I should use some sort of combination between (a+b)^n and log(n) but I'm really striking out !

2. Re: Algorithm to compute the k first and last digits of n^n

Hey SummerTime.

3. Re: Algorithm to compute the k first and last digits of n^n

Hi chiro,
No I don't actually study mathematics so I don't have access. But if you could just point me in the right direction? I will try to learn from around the web.
Thank you