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

Home > Just Math
Subtract 1 from squared abbbb (Posted on 2008-08-16) Difficulty: 3 of 5
Determine all possible five digit positive decimal (base 10) integer(s) of the form abbbb, with a ≠ b, that contain no leading zeroes, such that (abbbb2 - 1) is equal to a positive ten digit integer (with no leading zeroes) containing each of the digits 0 to 9 exactly once.

Note: While the solution may be trivial with the aid of a computer program, show how to derive it without one.

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

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Yes, it's trivial with a computer program | Comment 4 of 6 |
  100   for A=1 to 9
  200     for B=0 to 9
  300       if A<>B then
  400         :Tst=10000*A+1111*B:tst1=tst
  500         :Tst=Tst*Tst-1
  600         :Tsts=cutlspc(str(Tst))
  700         :if len(Tsts)=10 then
  800           :Good=1
  900           :for I=1 to 9
 1000             :if instr(mid(Tsts,I+1,*),mid(Tsts,I,1)) then Good=0:endif
 1100           :next
 1200           :if Good then print Tst1,tst
 1300     next B
 1400   next A

giving

 85555   7319658024
 97777   9560341728


  Posted by Charlie on 2008-08-17 13:35:13
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 (19)
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