Jocasta Numbers

Background

Write down a (non-palindromic) three digit number. Write it down backwards and take the smaller number away from the larger. Take this resulting number, and write it down backwards as well (taking this to be three digits too: 099 gives 990) and this time add the two numbers. If my instructions have been clear enough, you should end up with 1089.

That's nice. A cute little number trick. And what of it? Well, I'm a mathematician so I set about constructing a proof for this result. And then I started expanding it to more digits. And then I thought about even more generalisations. This resulting document goes on to prove that I like maths too much.

1089 Quick Proof

From above, we have for any three digit number 'αβγ' or 'γβα' with α>γ:

Formal definitions

This section goes straight into pure mathematical definitions for a series of functions to calculate individual Jocasta numbers in any general case. You can find brief English translations further on in the document, if you're having trouble understanding them.

In all of the function definitions below, x is any real, b>1, n∈{1, 2, 3, ...}, and i is any integer. [α] denotes the integer part of α when working in base-b, rounding towards 0. |α| denotes the absolute value of α, so that |α|≥0.

Convention: where the superscript b is omitted, we assume b=10.

Translations

bn(x) is the number of significant digits in the integer part of x, working in base-b.

bdi(x) is the (i+1)th digit of x when x is written in base-b, where i=0 is the least significant integer digit (units). This function only has a sensible meaning for integer values of i, although non-integer values will still produce figures.

bR(x, n) is the number constructed by writing the n digits of x backwards, working in base-b, starting with the least significant non-fractional digit of x.

So, bJ(x, n) reverses x and takes the smaller number away from the larger, then takes the resulting value and adds it to its reverse, all working in base-b with n digits. This final value is called a Jocasta number.

Furthermore, bB(x, n) is dividing the Jocasta number by the equivalent of 99 for whatever base you're working in.

Examples

  1. b=10, x=123, n=4.
    J = 0123 − 3210 = −3087
    J = 3087 + 7803 = 10890
    B = 10890 / 99 = 110

  2. b=16, x=3476, n=3.
    J = 3476 − 1181 = 2295
    J = 2295 + 2040 = 4335
    B = 4335 / 255 = 17
    ...or rewriting in hex code, x=D94...
    J = D94 − 49D = 8F7
    J = 8F7 + 7F8 = 10EF
    B = 10EF / FF = 11

  3. b=8, x=16177, n=5.
    J = 16177 − 7483 = 8694
    J = 8694 + 28098 = 36792
    B = 36792 / 63 = 584
    ...or rewriting in octal, x=37461...
    J = 37461 − 16473 = 20766
    J = 20766 + 66702 = 107670
    B = 107670 / 77 = 1110

Hypotheses

Where the appropriate variables are used in these hypotheses, their ranges are: x≥0, [x]=x, b>1, n∈{bn(x), bn(x)+1, bn(x)+2, ...}, i is any integer.

Hypothesis J1: bn(bB(x, n)) ≤ n−1

Hypothesis J2: bB(x, n) = [bB(x, n)]

Hypothesis J3: bdi(bB(x, n))∈{0,1}

 ( 1   for bdi+1 > bdni−2 ) 
Hypothesis J4: bdi(bB(x, n)) = { bdi+1(bB(x, n))   for bdi+1 = bdni−2 } and 0 ≤ i < n-1
 ( 0   for bdi+1 < bdni−2 ) 
 
Where bdi+1 = bdi+1(max{x,bR(x,n)})
and bdni−2 = bdni−2(max{x,bR(x,n)})

J1 effectively says bdi(bB(x, n))=0 for i≥(n−1), and J2 says that bdi(bB(x, n))=0 for i<0. J3 then states that all the other digits of bB(x, n) in between are either 0 or 1. Finally, J4 tells us by what basis of {x, n, i} we can tell which values they take.

Proofs (when completed) and further discussions still to be added. Do note, however, that I'm not actively working on this. Further work: part 2, part 3.

Help! Maths!