All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Non-increasing Squares (Posted on 2024-05-11) Difficulty: 3 of 5
What is the largest square (not ending in 0) whose digits are in non-increasing order, for example 441 and 7744?

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution No Subject Comment 1 of 1
Program checking n up to 10^8 (n^2 up to 10^16) finds:
[1, 4, 9, 64, 81, 441, 841, 961, 7744, 8874441, 9853321, 999887641]
This is oeis A062826, "Square nialpdromes not ending in 0".  The listing at oeis indicates that there are no more values checking up to 10^42.

A nialpdrome is a number whose digits are in non-increasing order.
I had not seen the word "nialpdrome" before; this appears to be a jumble of palindrome, where the first 5 letters are not-quite-precisely reversed.

Statistical argument (not a proof) that this set might be finite:
It can be shown that as the number of digits increases by 1:
 - the number of integers increases by a factor of 10,
 - the number of squares increases by a factor of ~√10
 - the number of nialpdromes not ending in zero increases by a factor of (n+8)/n, which approaches 1 for large n.

So statistically, as the number of digits increases by one, the probability that a random n-digit number is a square nialpdrome is
 1/√10 times the same probability for an (n-1)digit number
-----------
ndigitsquares = [0]
currentn = 1
count = 0
for n in range(10000):
    numdigits = len(str(n**2))
    if numdigits == currentn:
        count += 1
    elif numdigits > currentn:
        ndigitsquares.append(count)
        count = 1
        currentn += 1
print(ndigitsquares)

  Posted by Larry on 2024-05-11 09:51:34
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information