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

Home > Numbers
Some Digits Sum 37 (Posted on 2009-06-04) Difficulty: 2 of 5
Determine all possible positive base ten repdigit(s) N, such that the sum of the digits of N2 is equal to 37.

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 re(2): computer solution (a quibble) | Comment 3 of 4 |
(In reply to re: computer solution (a quibble) by Steve Herman)

list
   10   for Rd=1 to 9
   20      N=Rd
   30      loop
   40        N2=N*N:N2s=cutspc(str(N2))
   45        T=0
   50        for I=1 to len(N2s)
   60         T=T+val(mid(N2s,I,1))
   70        next
   80        if T=37 then print N,N2
   90        N=10*N+Rd
  100        if N>9999999999999999999999999999999999999999999999 then goto 120
  110      endloop
  120   next
  200   end
OK
run
 2222    4937284
 7777    60481729
OK

 


  Posted by Charlie on 2009-06-04 16:34:03
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 (15)
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