- #1

- 111

- 0

The string abbcccddddeeeee… continuously repeats such that after the final z, the letters abbcccddddeeeee… begin again.

What will be the 3000th letter in the pattern?

What will be the 3000th letter in the pattern?

Last edited:

You are using an out of date browser. It may not display this or other websites correctly.

You should upgrade or use an alternative browser.

You should upgrade or use an alternative browser.

- Thread starter K Sengupta
- Start date

- #1

- 111

- 0

What will be the 3000th letter in the pattern?

Last edited:

- #2

- 328

- 0

T

- #3

- 31

- 0

I Think it´s:

R

- #4

DavidSnider

Gold Member

- 502

- 143

Here's my guess:

Code:

```
var alpha = "abcdefghijklmnopqrstuvwxyz".split("");
var a = [];
var i=0;
var j=0;
var k=0;
while(i<=3000) {
for(j=0;j<k;j++) {
if(i<3000) {
a.push(alpha[k-1]);
}
i++;
}
k++;
if(k > alpha.length) k = 0;
}
a[a.length-1];
```

t

Last edited:

- #5

- 668

- 3

Code:

```
#!perl
for(A..Z) {$s.=$_ x++$i;}
$t=$s.($s x int(3000/length $s));
print substr($t,2999,1)."\n";
```

Or, more appropriately:

And the next question-- what happens if instead, after the final Z, the next A repeats 27 times, then B repeats 28 times and so forth?

DaveE

Last edited:

- #6

- 12

- 0

Code:`#!perl for(A..Z) {$s.=$_ x++$i;} $t=$s.($s x int(3000/length $s)); print substr($t,2999,1)."\n";`

Or, more appropriately:

And the next question-- what happens if instead, after the final Z, the next A repeats 27 times, then B repeats 28 times and so forth?

DaveE

I used basic math for this.

x(x+1) = 6000 and x = int -> x^2 < 6000 < x^2 + x ; x= 77. My answer is Y.

- #7

- 328

- 0

I used basic math for this.x(x+1) = 6000 and x = int -> x^2 < 6000 < x^2 + x ; x= 77. My answer is Y.

There appears to be something wrong with your basic math.

3000 / 351 = 8.547...

3000-351(8) = 192

192-1-2-3-4...-19 = 2

So T is the 3000th letter.

Share: