Jump to content
BrainDen.com - Brain Teasers
  • 0


Guest
 Share

Question

All the nonzero triangular numbers are written successively without commas or spaces resulting in this infinite string.

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

Determine the 2010th digit in the above pattern.

Edited by K Sengupta
Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

** Here is my quick foxpro program I used to solve it.

iSpr = 2

iNex = 1

sNum = ""

DO WHILE LEN(sNum) <= 2010

sNum = sNum + ALLTRIM(STR(iNex))

iNex = iNex + iSpr

iSpr = iSpr + 1

ENDDO

?"And the answer is: "

?SUBSTR(sNum,2010,1)

Link to comment
Share on other sites

  • 0

All the nonzero triangular numbers are written successively without commas or spaces resulting in this infinite string.

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

Determine the 2010th digit in the above pattern.

Link to comment
Share on other sites

  • 0

Ok the answer would be this... you would spend hours doing it number by number. 13610152128... now take my advice.

don't try and find the answer. the 2010th number would be bigger than 2,000,000 but it's the 2010th digit, not number. Try making triangles and triangles. That would be a waste. there are 3 sides in a triangle. 3 angles in a triangle. Most people say it's 3. It kinda makes sense.

Edited by ThisIsALie
Link to comment
Share on other sites

  • 0

A slow way of doing things.

Let's begin by asking the question, "how many triangular numbers are less than 10^k, that is, has less than k digits in base 10?"

For k = 1,

The number of terms, n = 3.

i.e. (By solving for the biggest n such that, (n^2+n)/2 < 10)

For k = 2

n = 13, so terms with 2 digits is 13 - 3 = 10.

For k = 3

n = 44, there are 31 terms less than 3 digits.

A table:

[k]......[n]......[n_k - n_(k-1)]*....[last column * k]

4........140......96..................284

5........446......306.................1530

6........1413.....967.................5802

7........4471.....3058................21406

The position in the string at those triangular numbers with less than 5 digits is 1530 + 284 + 44 + 13 + 3 = 1774 digits into the string.

We need 236 more digits to reach 2010

Then 260/6 = 39 1/3, so 39 terms from 446, which is 485, then use the second digit (from the left) of the next term at n = 486.

The 486th triangular number is 236 682.

Answer is the number 3.

Interestingly for all the 480's (from 480 to 489) gives the same beginning digits (2 and then 3),

so at position 2010 + 6t, 0=<t=<9, gives the answer 3. Perhaps this can lead to a better way of doing it?

Edited by marsupialsoup
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...