How would you find the 2550th digit of 0.12340123400123400012340000123400000.... where there are k zeros after the kth block of 1234.
Printable View
How would you find the 2550th digit of 0.12340123400123400012340000123400000.... where there are k zeros after the kth block of 1234.
to find number of complete blocks, find the # of digits in first block and last block and find the sum of digits such that it is less than or equal to 2550. then just figure out the # of remaining digits. and go from there.
Question:Quote:
Originally posted by SilverSprite
How would you find the 2550th digit of 0.12340123400123400012340000123400000.... where there are k zeros after the kth block of 1234.
Is 0 the first digit? If so,
Does the . count? If so,
that would make 1 in the third position.
Or, do you count from 1, such that 1 is the 1st digit?
Or, is this count similar to arrays, where the 1st digit is actually index = 0?
If the "0." Doesn't count, why do you include them in your question?
:)
BTW:
If the sequence is 12340123400123400012340000....
Instead of
0.12340123400123400012340000....
Then:
The N'th block starts at Position P, where:
P = (N2 + 7*N - 6)/2
And,
If K is an element of the set {1,2,3,4}
Then
N = (1/2)*[-7 plus/minus Sqr(81 + 8*(P - K))]
So, for N to be rational, At a given position P, if K creates a rational integral value out of
(1/2)*[-7 plus/minus Sqr(81 + 8*(P - K))], then K is at position P.
If there is no K that creates a rational integral N, then 0 must be at position P.
Unless I miscalculated.
:D
Now, How would this become more exact, I'm not sure.
It must be transformable.
Hmmmm,
:)
I will define my own blocks:
block 1:
1234
block 2:
01234
block 3:
001234
...
block n:
000...0001234
(n-1) 0's
therefore the first block has 4 digits
2nd has 5 digits
...
nth block has n+3 digits
after exactly nth block, the total number of digits would be:
(4+n+3)n/2
or (n^2+7n)/2
I will now find the number of complete blocks such that the # of digits does not exceed 2550:
(n^2+7n)/2<=2550
gives me:
n^2+7n<= 5100
n=69....
so when n=69
(n^2+7n)/2-2550>4
so the digit is probably a 0
block 1:
12340
block 2:
123400
block 3:
1234000
etc..
i did it by guessing, and i got a 4
I agree, it seems to be 4.:
VB Code:
' I Must be > -10, or else err on the sqrroot Private Sub Command1_Click() Dim I As Integer Dim MyLine As Double Dim MyCol As Integer Dim MyOutStr As String 'I = Val(Text1.Text) I = 2550 MyLine = Int((-1 + Sqr(1 + 8 * (I + 9))) / 2) MyCol = (I + 9) - ((MyLine ^ 2 + MyLine) / 2) If MyCol < 4 Then MsgBox "The " & I & "'th Number is " & MyCol + 1 Else MsgBox "The " & I & "'th Number is " & 0 End If End Sub
:)
-Lou
VB Code:
Private Sub Form_Load() Dim ms As String While Len(ms) < 2550 i = i + 1 ms = ms & "1234" & String(i, "0") Wend MsgBox Mid$(ms, 2550, 1) End Sub
4 is a winner
Bugz,
You said:
n^2+7n<= 5100
n=69....
However, solving for n in
n^2+7n-5100=0, you get
(n-68)*(n+75)=0
n=68 or n=-75
Since n>0, n=68, not 69.
When n=68, (n*(n+7))/2 is exactly 2550, so that must mean it is the last digit of a block, which is 4.
Since this is a multiple choice math contest question (don't remember which contest), they would never make the answer 0, since it first appears to be the most probable answer and anyone who can't do the question would guess 0, and the people who make these contests are evil...:D
In one of the passages:
i dont understand that. Why would you multiply (n+7) by n??Quote:
after exactly nth block, the total number of digits would be:
I just cant figure it out. I get how you get the numebr of zeros is(n-1) and that the nth block will have (n+3) digits, and that after the nth block there will be (n+7) digits, but i dont get the part where you muliply (n+7) by n. Can any1 explain this to me?? I know the equation works, but i just dont understand how you got this one part.
how did you come up with this conclusion?Quote:
and that after the nth block there will be (n+7)
anywayz, the first block has:
1234
second block has:
01234
third block has:
001234
and the nth block has:
0000...0001234
so the total number of digits is:
4+5+...(n+2)+(n+3)
notice the average of 4 and n+3, 5 and n+2, etc are (n+7)/2
there are a total of numbers so the sum is:
n(n+7)/2
where in the world did you come up with (n+2)?????
Is there a problem with this?
VB Code:
I = 2550 MyLine = Int((-1 + Sqr(1 + 8 * (I + 9))) / 2) MyCol = (I + 9) - ((MyLine ^ 2 + MyLine) / 2) If MyCol < 4 Then MsgBox "The " & I & "'th Number is " & MyCol + 1 Else MsgBox "The " & I & "'th Number is " & 0 End If
-Lou
it just so happens that kth block has k+3 elements, so (n-1)'s block has n+2 elements
Block 1: 12340 : 5 elementsQuote:
Originally posted by bugzpodder
it just so happens that kth block has k+3 elements, so (n-1)'s block has n+2 elements
Block 2: 123400 : 6 elements
Block 3: 1234000 : 7 Elements
...
Block N: 1234 & replace(space(N), " ", "0", 1, -1, vbTextCompare)
As stated :
So, the N'th block has N+4 elements,Quote:
Originally posted by SilverSprite
where there are k zeros after the kth block of 1234.
Which makes the (N-1)'s block have N+3 elements.
Right?
Is it so hard to notice that bugz's blocks are different from everyone else's? Bugz has the block defined as follows:
Block 1: 1234
Block 2: 01234
Block 3: 001234
etc...
For bugz's blocks, the nth block has (n+3) digits, and the (n-1)th block has (n+2) digits. For everyone else's blocks;
Block 1: 12340
Block 2: 123400
Block 3: 1234000
etc...
The nth block has (n+4) digits, and the (n-1)th block has (n+3) digits. I don't see how this is worth arguing about...No one is even wrong!:rolleyes: