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

Home > Numbers
A special short-list (Posted on 2015-12-08) Difficulty: 3 of 5
Some integers are one more than the sum of the squares of their digits in base 10.

Prove that the set of such integers is finite and list all of them.

See The Solution Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution solution with computer-generated list | Comment 2 of 3 |
Finiteness:

9^2 + 1 = 82
2(9^2) + 1 =  163
3(9^2) + 1 =  244
4(9^2) + 1 =  325

so no more than 3 digits is possible, as even if they're all 9's, the sum is only 3 digits until you get even more digits needed, and in fact, no higher than 244; in fact much less as it certainly can't start with 9, but we can check up to that value.


Evaluate the list:

DefDbl A-Z
Dim crlf$


Private Sub Form_Load()
 Form1.Visible = True
 
 Text1.Text = ""
 crlf = Chr$(13) + Chr$(10)
 
 For n = 1 To 244
  ns$ = LTrim(Str(n))
  t = 0
  For i = 1 To Len(ns)
   t = t + Val(Mid(ns, i, 1)) * Val(Mid(ns, i, 1))
  Next
  If t + 1 = n Then
    Text1.Text = Text1.Text & n & crlf
  End If
 Next n
 

 Text1.Text = Text1.Text & crlf & " done"
  
End Sub

finds 35 and 75.

  Posted by Charlie on 2015-12-08 10:45:22
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 (7)
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