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

 Shared by squares (Posted on 2015-02-10)
Devise an efficient method of finding consecutive squares which have the same digits.

Find such pairs up to 1000000.

Feel free to go further.

 No Solution Yet Submitted by Jer No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 A start | Comment 1 of 3
Well, if n^2 and (n+1)^2 have the same digits, then they have they same value mod 9, and their difference = 0 mod 9.

Their difference = 2n+1, so n = 4 mod 9.

So we only need to investigate every 9th n between 1 and 1000, starting with 4, for a possible 111 values.  Not very efficient, so I want to see what somebody else comes up with.

Using Excel on these 111 values, the only ones I notice are:

n  n^2  (n+1)^2
-- ------ ---------
13    169      196
157  24649   24964
913  833569 835396

This was based on manual inspection, so I might have missed some.

 Posted by Steve Herman on 2015-02-10 13:53:41

 Search: Search body:
Forums (0)