69^2 = 4761

69^3 = 328509

As you can see, the square and cube of 69, in base 10, contain all the digits with no repeats. In general, a *nice number*, in some base, is a real, natural number whose square and cube, written in that base, contain all the digits in that base with no repeats. Only normal positive integer bases are considered for this market.

So far, this is the only nice number I know of. I suspect that there are an infinite number, but they only start appearing around base 120 to 130; I checked up to around base 30.

I discuss this more in my blog post http://tinyurl.com/confluxblog/post/is-69-unique.

UPDATE 1/30/23: I wrote an update blog post! http://tinyurl.com/confluxblog/post/progress-update-on-the-search-for-nice-numbers

Anyway, hopefully this market inspires you to do some research into finding nice numbers, or to find someone else online who has!

I may also provide mana rewards for partial results.

Note: The original version of this market, embedded below, had a poorly worded definition which included negative numbers such as -69 (and more arguably complex numbers such as 69i and -69i). I've cancelled that market (resolved it N/A) and made this replacement. Still, the old one contains many comments with progress on the problem and cool related results! Along with discussion over the N/A resolution.

My new, subject-to-revision policy based on this dispute: In the rare event of a conflict between my resolution criteria and the common-sense, consensus spirit of the market, I may resolve it according to the market's spirit or N/A, probably after discussion.

And now trending on Reddit

A massimo retweet, nice!

https://twitter.com/Rainmaker1973/status/1649060100802330625?s=20

@JoshuaB Nah, no one has a large enough YES position. They'd have placed a limit order around 5%.

@IsaacKing There’s a bloody lot of liquidity to make still. For only 600 mana they could make 6000! (Though I don’t disagree it would’ve been more profitable to have a limit order)

This search for "nice numbers" kinda reminds me of the search for extraterrestrial life. I've been pretty adamant that all life is from earth since there are more ways to shuffle a deck of cards than atoms in the universe even though most people think it's all but guaranteed that life isn't an anthropogenic concept (made by humans) due to the vastness of the universe. This is analogous to the view that 69 base 10 is the only nice number since it was discovered because humans like base 10 and the number 69 and doing math and there is no sign of any other nice numbers other than the shear amount of numbers that exist.

I am quite sure it is easily provable that besides the b-1, there's no further information to be gained from any remainder of the sqube.

For example try calculating modulus 99 for some 1234567890 in some permutations in base 10. You'll notice you get exactly the same amount of information as modulus 9.

Here's how to make real progress on the problem. Since (n+k)^2 = n^2 + 2kn + k^2, then for base 120 and a range of say k=120^4, we have ~48 total digits; ~20 of these remain the same, ~20 change with the 2kn term (they basically change linearly) and only 8 are affected by the k^2 term. Around 40/48 digits of the square and 40/60 digits of the cube can be approximated linearly, and each digit tracked narrows down the search space by more than the previous digit.

There is a similar problem on mathoverflow which can be solved with lattice algorithms despite naively having an exponential search space. I can't find a way to easily adapt it to this case, but maybe someone could.

@ThomasKwa There are two problems with adapting lattice algorithms:

"all digits are distinct" is harder to express in a polynomial than "all digits fall within predefined values"

In the mathoverflow question the constraints are all modulo p, whereas here the modulus might as well be irrational

Nevertheless there's enough structure here that the problem seems solvable in theory.

About the first part, we could maybe start by demanding the sum and product of digits to be correct. I am not certain this is enough to make it unique. It probably isn't if you must add some modulus.

However there are other functions which do not depend on order. You could for example square all digits and sum them. Any power would work I think if we need even more constraints.

Squaring and multiplying them isn't going to be useful because it contains no kore information than just multiplying them.

I think all big multiplications and divisions can be eliminated, including base conversion. You can store the digits of n, n^2 and n^3 already in base b, then compute the next n, n^2 and n^3 using additions only. My guess is this is about a 10x speedup if implemented well. It should also work with the mod b-1 observation, you just need to also store 2 (b-1) n and such.

Also building the set of digits every time is unnecessary since the first ~b/5 digits of square and cube remain the same.

@ThomasKwa Oh that’s really smart! Seems obvious in retrospect to try.

Perhaps I was behaving a bit too much like the person who wanted to close the patent office in the 1940s or something because there was nothing left to be invented, since it seems like people are still finding insights on this problem that seem pretty canonical. I’m still skeptical that we can really get anywhere, but maybe if we knock off a few more orders of magnitude we’ll have a chance!

@ThomasKwa you're still looking for a needle in a 120^120 haystack. Constant factor speedups won't help.

Hmm I noticed an odd pattern.

Since checking the digits sum (DS) of the sqube turned out to be useful, I tried finding all the numbers with the right digits square sum (DSS).

First thing I noticed is that while yielding far less results, like with DS, no numbers with nice DSS were found in bases that are 3 mod 4.

That prompted to look for other patterns in mod 4 and I found this: I divided the amount of numbers with nice DS, by the amount of numbers with nice DSS in each base.

It is strictly increasing only when filtering by b mod 4.

I wonder if bases with a certain mod 4 are more likely to have nice numbers and if we can extract some optimization out of this.

note by the way there's a formula for 1^2+2^2+3^2+4^2... https://en.wikipedia.org/wiki/Square_pyramidal_number

@NoamY Ooh interesting angle! Yes, 3 mod 4 is proven to be impossible. Proof is in my second blog post - the reason is that it can never have the correct remainder mod b-1.

@NoamY Oops, sorry for not really reading. I'll try to take a more in-depth look at your results later!

@NoamY Alright, I actually read your comments. Sorry. The mod 4 increasing pattern seems pretty interesting! It seems very plausible that the different square-sum residues mod 4 would have different densities of nice numbers, since if I recall correctly, this is true for sums. I am curious, do square-sums have any nice mathematical properties like regular digit sums? Do they have to be conserved in a modulus? They might be but I can’t quite convince myself at the moment.

I can't find any useful property of digits squares sum. I looked at OEIS and didn't anything useful either.

I tried replicating this behavior with the quasi version with success.

I also noticed the same thing when sorting by b/4 for both quasi and non quasi.

This implies it's a function of b/4 and b%4.

@NoamY Nope, I’ve got Python code but I’m afraid the person who said that is just “some guy on reddit”