ANSI X9.31 AES pseudocode or algorithm explanation I want to write a program that will generate random data by using ANSI X9.31 with AES 128 bit, however I could find the standart only with cryptographic notation, and I did not understand it clearly. 

I = ede *K(DT)
R = ede *K(I XOR V)
V = ede*K(R Xor I)


Could you explain me how the algorithms works or suggest me any document to understand it, I tried to understand from the notation but I could not. Thank you in advanced.
Lets go through the steps in detail:

I = ede*K(DT)


K is a long term secret key; that's a random value which is the key of X9.31; it's selected somehow (X9.31 doesn't specify how), and the security of the random numbers depends on it.  Because you are using AES, this would be a random 128 bit value.

When it says 'ede*K(X)', what X9.31 means is 'take the value X, and send it through the block cipher operation (in the encrypt direction).  X9.31 calls it ede because it was written in terms of 3DES (which is done by doing 3 DES operations, in ede mode); for you, you'd just replace it with a single AES encryption operation.

DT is the current date/time (which is updated for every iteration); for you, this would be a 128 bit value, and the format you select for how to express the current time doesn't matter.

The result is placed into a temporary location (called I)

R = ede*K(I XOR V)


V is the X9.31 current state (which also needs to be kept secret); for you, this is a 128 bit value.

In this step, you take the current state V, exclusive or that with the temp variable I generated in the previous step, send that though AES.

R is the 128 bits of output that X9.31 generates this iteration.

V = ede*K(R Xor I)


Here, you take the two values generated in the previous two steps, exclusive or them together, send them through AES; that's the updated X9.31 state you'll use for the next iteration.

And, remember, when you've done this, R contains the 128 random bits that you asked for...