Infinite String and Letter Puzzle

After the final Z, the next A should repeat 26 times, not 27. The 3000th letter in this pattern would then be B. In summary, the string abbcccddddeeeee... continuously repeats and the 3000th letter is B.
  • #1
K Sengupta
113
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?
 
Last edited:
Physics news on Phys.org
  • #2
T
I think
 
  • #3
I Think it´s:
R
 
  • #4
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
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:

There are 26 letters in the alphabet, hence the string from the first A to the final Z will be ((1+26)/2)*26 characters long (351 characters). 3000 modulo 351 is 192. Hence, the 3000th character will be the same as the 192nd character. You can find this by finding when N choose 2 is equal to or greater than 192, which happens to be at N=20 (20 choose 2 being 210). And the 20th letter of the alphabet is T.

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
davee123 said:
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:

There are 26 letters in the alphabet, hence the string from the first A to the final Z will be ((1+26)/2)*26 characters long (351 characters). 3000 modulo 351 is 192. Hence, the 3000th character will be the same as the 192nd character. You can find this by finding when N choose 2 is equal to or greater than 192, which happens to be at N=20 (20 choose 2 being 210). And the 20th letter of the alphabet is T.

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
Zubin said:
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.

26*(26+1)/2 = 351
3000 / 351 = 8.547...
3000-351(8) = 192

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

So T is the 3000th letter.
 

1. What is the Infinite String and Letter Puzzle?

The Infinite String and Letter Puzzle is a mathematical problem that involves a string of infinite length and a set of letters. The goal of the puzzle is to determine if a specific letter appears in the string an infinite number of times or not.

2. How does the Infinite String and Letter Puzzle work?

The Infinite String and Letter Puzzle is based on the concept of infinity. The string is assumed to be infinitely long, and the letters are randomly placed within the string. By analyzing the patterns and repetitions within the string, one can determine if a specific letter appears an infinite number of times or not.

3. Is the Infinite String and Letter Puzzle used in any real-life applications?

The Infinite String and Letter Puzzle is primarily used as a mathematical exercise to test one's problem-solving skills. However, it has also been used in cryptography and coding theory to analyze patterns in strings of characters.

4. What are some strategies for solving the Infinite String and Letter Puzzle?

One strategy for solving the Infinite String and Letter Puzzle is to break down the string into smaller sections and analyze the patterns within those sections. Another strategy is to use mathematical formulas and equations to determine the frequency of a specific letter within the string.

5. Are there any variations of the Infinite String and Letter Puzzle?

Yes, there are various versions of the Infinite String and Letter Puzzle, such as the Infinite Binary String and Letter Puzzle, which uses binary code instead of letters. There are also variations that involve multiple strings and letters, making the puzzle more complex and challenging.

Similar threads

Replies
14
Views
643
Replies
2
Views
442
  • Programming and Computer Science
Replies
28
Views
1K
  • Programming and Computer Science
Replies
17
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
12
Views
1K
Replies
15
Views
417
Replies
24
Views
2K
Replies
7
Views
15K
  • Differential Equations
Replies
1
Views
656
  • Beyond the Standard Models
Replies
4
Views
1K
Back
Top