JADDOU3 - Jaddouic Sequence
Jadou has created another boring sequence, he wrote the 1st 5 numbers on a stone, 300 years later Hasan Jadou Jr. found the stone and wanted to find the nth element of the sequence.
The numbers written on the stone were...
3, 10 , 36 , 136 ,528.
Jaddou junior descovered that the elements of the sequence are always even except the 1st one.
Help Jadou find the rest of the sequence.
print the nth element of the Jaddou sequence
One integer n.(0<n<10^18)
The nth element of the Jaddou sequence mod 123456789.
Input: 5 Output: 528
Anubhav Balodhi :
Is the ans for 10^18 = 32810158 ?!Last edit: 2014-02-13 14:24:28
getting wa, although code is working for above cases. please tell me where it is going wrong
Give more test cases.