Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How random this numbers look,


Here the system I used to get them, first pick the seed,


then add the value of the 2nd number to the 1st and write it between them and the 3rd to 2nd and write it between them and etc.


and repeat again 2nd to 1st etc. to get more numbers.


last step double each number 1>2 5>20 etc.


Is it random or not because I want to use as a one time pad. so is it random even if you know how I generate them?

share|cite|improve this question
Reminds me of – gnometorule Dec 10 '12 at 17:26
Check out… (that's what you're trying to devise here). – Fixee Dec 10 '12 at 17:43
up vote 7 down vote accepted

Your example is not at all random and is dangerous for the application you mention.

Perhaps you should look at the following methods of verifying the quality of random numbers. It is a difficult and very important topic in such things as simulations and cryptography.

Here are some of the test suites: PractRand, TestU01, RaBiGeTe, DIEHARD, DIEHARDER (search Google).

Additionally, you might want to read the TestU01 paper that describes the difficulties.

Lastly, you might want to have a look at:

Maybe if you could describe what you are looking for these for in more detail, we could provide more guidance (if it is a One-Time-Pad, you need a high entropy quality source and that is as hard as it gets).

Enjoy -A

share|cite|improve this answer
thanks for the links, gona read and study them and back again soon. – illsecure Dec 11 '12 at 7:28

Every manually generated number is not random. Computers generate mostly using modulo arithmetic (at their core), so called pseudo-random numbers. Good algorithms are well-understood. I suggest you pick one (eg, Wikipedia) if you care about 'good' properties. Your algorithm only generates a one-time number in a deterministic way, with a length that is constructed to be what you make it. So by no reasonable definition it is random. While pseudorandom algorithms also deterministically determine a sequence of pseudo-random numbers, at least it is a 'random-looking' sequence. In your case, you could just write your result down and say 'it looks random."

share|cite|improve this answer
understood, thanks – illsecure Dec 11 '12 at 7:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.