Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

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

I am searching for a mathematical technique by which I can perform the following, Let me explain first what i want to do. consider a numeric series:

 23, 45, 42, 56, 12, 56 ...

Now, I want to perform any calculation so that at final I will get two numbers at the end. lets say 33,22 . These two numbers a such, so that I can regenerate the above series again by applying some calculations.

23, 45, 42, 56, 12, 56 ...

Is it possible in mathematics.

share|cite|improve this question

migrated from Feb 15 '13 at 17:45

This question came from our site for users of Mathematica.

So you are asking: can I take a series and convert it into two numbers, and then use the numbers to regenerate the original series? – George V. Williams Feb 15 '13 at 17:49
Is your sequence finite? Are the entries all integers? – user7530 Feb 15 '13 at 18:11
@GeorgeV.Williams You are right. I want the same – BOSS Feb 16 '13 at 9:51
@user7530 , Yes all are integers. and It should be finite – BOSS Feb 16 '13 at 9:52
I've retagged. This is certainly not number theory. It feels like you are looking for a data compression scheme, in which case StackOverflow would be a much better place to ask than here. – Willie Wong Feb 19 '13 at 17:02

Whether or not this is possible depends entirely on the details of the problem. Here are a few cases.

The sequence contains finitely many integers, and the two numbers must be integers.

This is possible. Let $M$ be the largest integer in the sequence; $M$ will also be your first number. Then let $$N = \sum_i a_i M^i$$ where the $a_i$ are the entries of your sequence. $N$ is your second number. To decode the sequence, repeatedly take $N$ mod $M$ followed by division by $M$.

The sequence contains infinitely many integers, and the two numbers must be integers.

Not possible. The cardinality of the set of pairs of integers is $\aleph_0$, while the cardinality of the set of infinite sequences of integers is at least $2^{\aleph_0} > \aleph_0$.

The sequence contains infinitely many integers, and the two numbers can be reals.

This is possible. First, encode the sequence of integers as a sequence of positive integers (using, for instance, the usual map that takes positive integers $n$ to $2n$, and non-positive integers to $-2n+1$) and then encode the sequence of positive integers as the continued fraction

$$N = \alpha_1 + \frac{1}{\alpha_2 + \frac{1}{\alpha_3 + \frac{1}{\ddots}}},$$ which always converges.

(No second real number is needed.)

The sequence contains infinitely many real numbers, and the two numbers must be reals.

Again, not possible, for the same reason as the second case above; $2^{2^{\aleph_0}} > 2^{\aleph_0}.$

share|cite|improve this answer
Thank Your for your replay, Could you please give an example. – BOSS Feb 16 '13 at 9:56

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.