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

 Power Pattern Poser (Posted on 2010-04-27)
The cube of the next even positive integer is written beside the square of every odd positive integer in ascending order, without commas or spaces, resulting in this infinite pattern:

1896425216495128110001211728........

Determine the 2010th digit in the above pattern.

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

Comments: ( Back to comment list | You must be logged in to post comments.)
 solution | Comment 2 of 3 |

The largest 1-digit odd square is 9, so there are only two such squares.

For 2-digit odd squares they must be less than 100, and so are the squares of numbers from 5 to 9 and there are three of them.

The 3-digit odd squares are those of odd numbers from 11 to 31, of which there are eleven.

The 4-digit odd squares are those of odd numbers from 33 to 99, of which there are 34.

The 5-digit odd squares are those of odd numbers from 101 to 315, of which there are 108.

`         squares of      #of digits     cumulative1   2      (1,3)               2              22   3      (5-9)               6              83  11      (11-31)            33             414  34      (33-99)           136            1775 108      (101-315)         540            717`

We can make a similar table for even cubes:

`          cubes of         #of digits    cumulative1   1      (2)                  1              12   1      (4)                  2              33   2      (6,8)                6              94   6      (10-20)             24             335  13      (22-46)             65             986  26      (48-98)            156            2547  58      (100-214)          406            6608 125      (216-464)         1000           1660`

So through the 316th segment, there are 717 digits provided by odd squares. The even cubes contribute 660 + 8*(316-214)/2 = 1068, making 1785 in all.

Thus there are 2010-1785=225 digits to go at 6+8=14 digits per pair of segments. That's 16 more full pairs plus one digit into the next. That takes us to the first digit of the (316+32+1)=349th segment. Since 349^2=121801 that digit is 1.

Corroboration:

list
10   while Curlen<2010
20    inc N
30    if n @ 2 = 1 then V=N*N:else V=N*N*N
40    News=cutspc(str(V)):Curlen=Curlen+len(News)
50   wend
60   Psn=2010-(Curlen-len(News))
65   D=mid(News,Psn,1)
70   print D,N,News,Psn
OK
run
1        349    121801   1
OK
showing the digit, the number whose square is shown and the position within that square from which the digit was taken.

 Posted by Charlie on 2010-04-27 18:19:11

 Search: Search body:
Forums (0)