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

Home > Just Math
Triangular Trial (Posted on 2010-07-20) Difficulty: 2 of 5
All the positive triangular numbers are written successively without commas or spaces resulting in this infinite string.

13610152128364555667891105120136153171..............

Determine the 2010th digit in the above pattern.

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 computer solution Comment 2 of 2 |

DEFDBL A-Z
sought = 2010
FOR i = 1 TO 1000
  diff = diff + 1
  tr = tr + diff
  t$ = LTRIM$(STR$(tr))
  PRINT t$
  prevCt = ct
  ct = ct + LEN(t$)
  IF ct >= sought THEN
    d$ = MID$(t$, sought - prevCt, 1)
    PRINT diff; d$: END
  END IF
NEXT

finds as the last couple of lines of its output:

97903
 442 3

meaning that the sought digit is 3, being the last digit of the 442nd triangular number, 97903.


  Posted by Charlie on 2010-07-20 13:50:02
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 (13)
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