# Unsolved Inequality

The following inequality resulted from Waring's problem. Paraphrased from Wikipedia:

Are there any positive integers $$k\ge6$$ such that: $$3^{k}-2^{k}\left\lfloor \left({\tfrac {3}{2}}\right)^{k}\right\rfloor >2^{k}-\left\lfloor \left({\tfrac {3}{2}}\right)^{k}\right\rfloor -2$$

Mahler proved that there could only be a finite number of k; none are known.

Kubina and Wunderlich, in their book Extending Waring's conjecture to 471,600,000, have shown that any such $$k$$ would need be larger than 471,600,000.

It is conjectured, but not proven, that no such $$k$$ exist. I have been unable to find a name for this specific inequality. From what I have found, it is not called Waring's problem but instead is a result of Waring's problem.

##  Unsolved-inequality.cpp 

Change the value of PRECISION to increase the maximum $$k$$ (or more accurately the maximum $$3^k$$) that the program can reach. You can also change the starting $$k$$ by changing the value of k = 6 below the beginning of the main function. This program is not optimized, and there are definitely better ways to brute-force this inequality.

#### Example

Error: Precision exceeded at k = 56837 with 10000 digits


This program was tested using the g++ compiler. I recommend using -Ofast. Below is a comparison of run times until precision is exceeded using the different optimization flags. While my system will be different from others, the relative time improvements are what is important.

Optimization Flag Real Time
None 11m 40.775s
-O1 (-O) 3m 59.017s
-O2 2m 47.888s
-O3 1m 50.419s
-Ofast 1m 47.860s

So, use -Ofast or -O3 unless you have time to kill.

$g++ -o Unsolved-inequality -Wall -std=c++14 -Ofast Unsolved-inequality.cpp$ time ./Unsolved-inequality
real	1m47.860s
user	1m47.856s

$g++ -o Unsolved-inequality -Wall -std=c++14 -O3 Unsolved-inequality.cpp$ time ./Unsolved-inequality
real	1m50.419s
user	1m50.316s

$g++ -o Unsolved-inequality -Wall -std=c++14 -O2 Unsolved-inequality.cpp$ time ./Unsolved-inequality
real	2m47.888s
user	2m47.840s

$g++ -o Unsolved-inequality -Wall -std=c++14 -O1 Unsolved-inequality.cpp$ time ./Unsolved-inequality
real	3m59.017s
user	3m59.000s

$g++ -o Unsolved-inequality -Wall -std=c++14 Unsolved-inequality.cpp$ time ./Unsolved-inequality
real	11m40.775s
user	11m40.576s