17

Definition & questions

Every number aN can be written in some integer number base b2 using d-digits:

a=(a1,a2,,ad1,ad)¯b=a1bd1+a2bd2+a3bd3++ad2b2+ad1b1+adb0=((((((a1)b+a2)b+a3)b+)b+ad2)b+ad1)b+ad

If we multiply the last expression by b, then replace all b's with a1,,ad, we get fb(a).

(We replaced the multiplications with the base, with multiplications with the digits.)

If it holds a=fb(a), then we call number a an "Baseless number (in base b )".

For example, 8385 is a 4-digit Baseless number in base 10 (decimal number base), because:

8385=((((8)10+3)10+8)10+5)=((((8)8+3)3+8)8+5)5=f10(8385)

From now on, assume a2 because 1 is trivially baseless in all number bases.

I have two questions. Firstly and mainly,

1. Existence: Does every number base b4 contain at least one Baseless number?

  • Status: Currently b=107 is the smallest base with no known examples.

Secondly and supplementary,

2. Solving decimal base: Is number 8385 the only decimal Baseless number?

  • Solved: This was now proven to be true by an exhaustive search.


2. Baseless numbers in decimal number base

Is number 8385 the only decimal Baseless number?

I've checked this up to 1010 so far, and found no other examples.

Scatter-plotting the "error" E10(a)=(af10(a)) for a[1,106] we have:

enter image description here

A graph filled with Waterfall structures.

Can we prove that E10(a)0 for all a2 other than a=8385 ?

I have looked at which point will E(a)>0 for all a>a0 for some a0:

  • We know that fb(a) of a d-digit number is at most ub(d)=i=1d+1(b1)i, the case when all digits are set to (b1), the largest base b digit. We also know that a d-digit number is at least lb(d)=bd1. But notice that we can't have a zero digit in the number a because then fb(a) automatically has less digits than a, so we can improve the lower bound to lb(d)=i=1dbdi.

  • Hence, we try to find all d for which ub<lb. For b=10 we have:

    98(1+9d+1)<19(1+10d)   if   d>42.8266

  • That is, we know that if a has d43 digits, then f10(a) has less than d digits. In other words, we have f10(a)<a, implying E10(a)>0 for all a1042.

This means if there is a second solution for the decimal number base, it must be a<1042.

That is, so far I have that if there is a second example, it is a[1010,1042].

Can we somehow lower this bound or remove significant families of numbers from it?

Update:

Turns out an exhaustive computer search is possible on small bases.

All number bases b13 are solved now. I've posted this result as my own partial answer.



1. Existence in other number bases

It is not hard to see that b=2 has no examples, and for b=3 we can prove there are no examples by checking all numbers up to 105. (Following the bound given in the previous section, larger numbers than this have E3(a)>0). Hence from now on, assume b4.

Does every number base b4 contain at least one Baseless number?

It appears every base has a very small amount in total, if any.

Generally, to solve for all d digit examples in base b, we have the Diophantine equation:

()a=i=1daibdi=i=1dai2j=i+1daj=fb(a)

In digits 0<a1,,ad<b. The question is now, is it true that:

For all b4 there exists d2 such that () has at least one solution for the digits?

For example, if the number base is a perfect square b=r2, then we have a trivial 2-digit example:

a=(1,b)¯b=((1)b+b)=((1)1+b)b=fb(a)

This is because if we set d=2 in () we get a1b+a2=a12a2+a22. Now specially for a1=1 it reduces to a22=b implying that if b is a perfect square, then the number (1,b)¯b=b+b is a Baseless number in the base b.

If we look at d=2 in general, all solutions below base 100 are in this pastebin table (d=2).

If we look at d=3, almost all bases below 100 have one or more 3-digit Baseless number examples. You can see the list of all solutions in this pastebin table (d=3).

And so on. But does every base b4 have at least one solution for at least one d2 ?


I started searching for "smallest example per number base".

The record bases with next largest smallest example are: (Thank you nickgard.)

base    example         digits in base
4       6               [  1,  2  ]
5       12              [  2,  2  ]
6       160             [  4,  2,  4  ]
7       324             [  6,  4,  2  ]
8       405             [  6,  2,  5  ]
10      8385            [  8,  3,  8,  5  ]
18      25215           [  4,  5,  14, 15 ]
24      323844          [  23, 10, 5,  12 ]
32      1038448         [  31, 22, 3,  16 ]
43      1593074855      [  10, 35, 41, 39, 11, 19 ]
73      25683204625     [  12, 28, 28, 56, 52, 65 ]
107     ?               ?

The smallest example for base 107 is a>1076>1.51012, so far.

Other bases below 500 that do not have any examples below 1010 are:

191,227,307,331,373,386,398,411,421,431,467,471,485

For bases below 500 with known smallest solutions, see this pastebin table.

Is it possible to optimize the search for the smallest Baseless number in some base b?

CC BY-SA 4.0
5
  • 1
    Some more smallest examples: [56,1044820][53,1080289][95,2757742][97,16316136][83,17926545][69,22505500]. Bases 43 and 73 have no solutions below 231. Commented May 4, 2020 at 16:53
  • 2
    I had an overflow bug when I reversed the digits to do the calculation! It didn't affect relatively low numbers, so all the results in the previous comment are correct, but 43 does in fact have a solution below 231. [43,1593074855][73,25683204625]. The number must be divisible by its last digit in the relevant base, so that provides a small speed-up to the search. Commented May 5, 2020 at 10:18
  • 1
    @nickgard Thank you. You motivated me to rewrite my code from Mathematica to C++ and I can now confirm your results for 43,73. (Now it takes me around 60 seconds on my laptop to check 109 numbers for some base b - so 73 took me about 25 minutes now.) Commented May 5, 2020 at 12:29
  • 2
    "Baseless" is sort of an odd name for this because it suggests some kind of base invariance, but this concept is relative to a specific base. It's strange to call something "base-10 baseless". Commented May 8, 2020 at 17:00
  • Now cross-posted to Mathoverflow. Commented May 18, 2020 at 17:50

1 Answer 1

5

I haven't made any progress in answering the first question, but I solved the second question.


That is, I computationally (by exhaustive search) prove that:

The number 8385 is indeed the one and only decimal baseless number.

For the decimal base (b=10), it is sufficient to check only a small fraction of numbers in the interval [11,1022]. In fact, this amount is so small that it is doable in few seconds.

The idea is to check only intervals where there exist numbers such that Eb(a)0. (where Eb(a)=afb(a) is defined in the original question)

For example, if b=4, instead of checking all numbers in [5,4d0] where d0 is sufficiently large, we can simply check only those in the highlighted intervals:

enter image description here

Algorithm to find the highlighted intervals

For example, to find all d digit solutions for base b=10, we start with a d-digit number 999999 and start lowering the first digit until it is some x1, until af10(a)0 is no longer true. We discard all numbers whose first digit is smaller than some x1 because they satisfy af10(a)>0 and hence can't be a solution.

This leaves us with numbers whose first digit is [x1,9]. (We found lower bound for the first digit.) We repeat this process for each possible case of the first digit, but now we decrease the second digit until af10(a)0 is no longer true.

This gives us numbers whose second digit is [x2(x1),9] for each fixed choice of the first digit x1[x1,9]. (We found lower bounds for the second digit depending on the first digit.)

Now we move onto the third digit to find lower bounds on the third digit depending on what is the second and first digit, and so on.

We repeat this process until we reach the unit digit lower bound [xd(x1,x2,,xd1),9], where xd depends on all previous digit choices x1,x2,,xd1. In this last step, we have all numbers a for which we have af10(a)0. To find solutions, we check for which numbers the equality holds af10(a)=0.

For large enough d0, we get 0 intervals in the first step so we can eliminate all such dd0.

This works because we are simply discarding intervals of numbers for which af10(a) is strictly positive. Such numbers a are all larger than the f10(a) and can't be a solution.

For larger bases b than 10, this can be optimized by preforming a binary search on the digit at each step, instead of linearly decreasing the largest digit until (afb(a))0 is no longer true. Another optimization could be to optimize the check for the (afb(a))0 condition itself. But I haven't bothered with such or similar optimizations because this is already good enough to answer the b=10 case.

Here is a quick hack of the idea that I used to fully solve b=10 and other small bases:

("cases" is only the number of numbers iterated in the last step of the segment division)

#include <iostream>
#include <vector>
#include <ctime>
#include <limits>
#include <boost/multiprecision/cpp_int.hpp>

using namespace std;

typedef unsigned int digit_;
typedef std::vector<digit_> digitV_;
typedef boost::multiprecision::int256_t number_;

const number_ number__max = std::numeric_limits<number_>::max();
const digit_ digit__max = std::numeric_limits<digit_>::max();

void printLocalTime() {
    time_t t = time(0);
    tm* now = localtime(&t);
    cout << (now->tm_hour + 0) << ':'<< (now->tm_min + 0) << ':'<<  now->tm_sec;//<< endl;
}

void print(digitV_ digits) {
    cout << "[ ";
    for(int i = 0; i < digits.size(); i++) {
        cout << digits[i] << " ";
    }
    cout <<"]";
}

number_ nval(digit_ base, digitV_& digits) {
    number_ n = 0;
    for(int i = 0; i < digits.size(); i++) {
        n += digits[i];
        n *= base;
    }
    n /= base;
    return n;
}

number_ fval(digit_ base, digitV_& digits) {
    number_ n = 0;
    for(int i = 0; i < digits.size(); i++) {
        n += digits[i];
        n *= digits[i];
    }
    return n;
}

number_ totcases = 0;
number_ cases = 0;
bool brnary(digit_ base, digitV_ &digits, digit_ step = 0) {
    //if (step<=3 && digits.size()>= 4) {print(digits); cout << " ("; printLocalTime(); cout << ") " << endl;}
    bool found = false;
    digit_ _digit = digits[step];
    for (digit_ dlast = base-1; dlast > 0; dlast--) {
        digits[step] = dlast;
        /** iterating solution segment for solutions **/
        if (step == digits.size()-1) {
            cases += 1;
            totcases += 1;
            number_ neval = nval(base, digits);
            number_ feval = fval(base, digits);
            if (neval == feval) {
                cout << base << " " << nval(base, digits) << " ";
                print(digits); cout << endl;
                found = true;
            } else if (neval > feval) {
                break;
            }
        /** recursively entering potential solution segments **/
        } else {
            if (nval(base, digits) <= fval(base, digits)) {
                found = brnary(base, digits, step+1) || found;
            } else {
                break;
            }
        }
    }
    digits[step] = _digit;
    return found;
}

int main() {
    cout << "limits: number__max(" << number__max << "), digit__max(" << digit__max << "). "; printLocalTime(); cout << endl;

    int bstart;
    cout << "starting base = ";
    cin >> bstart;

    for (digit_ base=bstart; base<digit__max; base++) {
        cout << "\nbase " << base << ": " << endl;
        totcases = 0;
        for (digit_ d=2; d<=digit__max; d++) {
            cout << "digits " << d << ": ("; printLocalTime(); cout << ") " << endl;
            cases = 0;
            digitV_ digits(d, base-1);
            if (brnary(base, digits)) {}//break;}
            cout << "cases: " << cases << endl;
            if (cases == 0) {break;}
        }
        cout << "total cases: " << totcases << endl;
    }
    return 0;
}

But the complexity of this algorithm still grows more than exponentially, relative to the largest digit case d we need to check, which grows relative to base b.

For b=13, it already takes up to an hour to check all possible candidates for all solutions. At the end, I've included all baseless numbers for bases b13. So this only works in reasonable time for very small bases b, which is sufficient to fully solve the b=10 case.

Here are all solutions for baseless numbers for bases b13 :

("numbers checked" only counts "cases" from the last step of the algorithm)

base 4:
6 [ 1 2 ]
46 [ 2 3 2 ]
27 [ 1 2 3 ]
numbers checked: 31

base 5:
12 [ 2 2 ]
64 [ 2 2 4 ]
numbers checked: 133

base 6:
160 [ 4 2 4 ]
numbers checked: 649

base 7:
324 [ 6 4 2 ]
928 [ 2 4 6 4 ]
numbers checked: 3547

base 8:
405 [ 6 2 5 ]
11645 [ 2 6 5 7 5 ]
numbers checked: 22298

base 9:
21 [ 2 3 ]
12 [ 1 3 ]
196 [ 2 3 7 ]
2172 [ 2 8 7 3 ]
2075 [ 2 7 5 5 ]
29869 [ 4 4 8 6 7 ]
numbers checked: 157677

base 10:
8385 [ 8 3 8 5 ]
numbers checked: 1267736

base 11:
36 [ 3 3 ]
1257 [ 10 4 3 ]
405 [ 3 3 9 ]
11225 [ 8 4 8 5 ]
numbers checked: 11160271

base 12:
189 [ 1 3 9 ]
9738 [ 5 7 7 6 ]
2673 [ 1 6 6 9 ]
1677823 [ 6 8 10 11 6 7 ]
numbers checked: 105405889

base 13:
1484 [ 8 10 2 ]
784 [ 4 8 4 ]
numbers checked: 1076880407
CC BY-SA 4.0
2
  • Bases that have exactly one baseless number: {6,10,} . The next term is 38 (If the next term is not 38, then base 38 should have at least one d8 example, because for d<8 it has one solution only.) Commented May 9, 2020 at 15:02
  • 1
    Are you aware of the fractal structure of your graph? Each next waterfall seems to be an expanded copy of the previous and also similar to its stretched copy. Commented May 30, 2020 at 6:08

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.