Let's call a positive integer N self-indulgent of degree K>2 if for every positive integer k<K the following is true:

More than half of the first k multiples N,2N,...,kN of N contain with multiplicity all the digits of N. So, if, for example, the digit 4 occurs three times in the decimal representation of N, then it has to occur three or more times in that of the multiple.


Do self-indulgent numbers exist? If yes, can you give one of degree at least 10?

Attribution: Mine I think but wouldn't be too surprised if to coin a phrase I independently rediscovered it.


The answer is

that self-indulgent numbers of arbitrary degree exist


if we pick a prime p such that the decimal expansion of 1/p has a repeating period of "full" length p-1, then the integer N formed by that repeating period has the property that N, 2N, ..., (p-1)N all use the exact same digits. (They are cyclic permutations of one another.) And there are infinitely many primes with this property.

For instance,

if we take p=19 we get the number N=52631578947368421 (it "really" has a leading zero but this does us no harm) and the numbers 2N,...,18N all have the same set of digits as N, plus one zero.

  • $\begingroup$ Wow, I hate to admit it but I wasn't aware that there is such a smart answer to my humble question! $\endgroup$ – loopy walt Apr 6 at 1:21
  • $\begingroup$ Does that mean you have a simpler lower-brow solution? If so, and if it goes beyond "here is one example", I'd be interested to see it. $\endgroup$ – Gareth McCaughan Apr 6 at 14:17
  • $\begingroup$ I'm not sure it goes much beyond "here are two examples" but I'll show you anyway: 1234567890 (works for 1,2,4,5,7,8,..,22,23,25,26) and to a lesser extent 9876543210 (works for 1,2,4,5,7,8,10). I felt these are guessable enough to make an acceptable puzzle (for example, multiplying by 2 creates (viewed digit-by-digit) two copies of each even digit and 5 carries, just the right number to recreate the 5 odd digits, so trying permutations of 0123456789 is sort of educated guessing). I'd love to hear if you can see any deeper reason, also for the rather intriguing hit-hit-miss pattern. $\endgroup$ – loopy walt Apr 6 at 17:12
  • $\begingroup$ Oh, those are rather cute. Beyond the observation that 1/81 = 0.012345679 recurring I don't see anything that looks like a fancy mathematical reason why they work, but I could well be missing something. $\endgroup$ – Gareth McCaughan Apr 6 at 22:34
  • $\begingroup$ Actually, this 1/81 thing is good enough for me! Goes quite a bit of way to make it all plausible. For example, for k = 8 we get an almost clean argument: 8/81 = 1/9-1/81 = 0.1111111 - 0.012345, thus each digit d is replaced with 9-d. But how did you find it? WIth the benefit of hindsight, yes, of course, (1/9)^2 = 0.1111111^2 = 0.012345 etc. but it would have taken me forever to think of that myself. $\endgroup$ – loopy walt Apr 7 at 0:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.