In a sequence of four positive numbers, the first three are in geometric progression and the last three are in arithmetic progression. The first number is 12 and the last number is 452. The sum of the two middle numbers can be written as ab where a and b are coprime positive integers. Find a+b.

The numbers are

12, 12+d, 12+2d, 452
12, 12+d, (12+d)r, (12+d)r^2=452

(12+d)r^2 = 452
12+2d = (12+d)r

so,

r = (12+2d)/(12+d)

(12+d)((12+2d)/(12+d))^2 = 452
(12+2d)^2 = 452(12+d)
d = 112.71
r = 1.09377

The numbers are

12, 124.71, 237.42, 452

To solve this question, we need to find the two middle numbers in the sequence and calculate their sum.

Let's start by representing the terms in the sequence as follows:
The first term: a
The second term: ar (since they are in a geometric progression, r represents the common ratio)
The third term: ar^2
The fourth term: ar^2 + d (since they are in an arithmetic progression, d represents the common difference)

Given that the first number is 12 and the last number is 452, we can write the following equations:

a = 12 (equation 1)
ar^2 + d = 452 (equation 2)

To find the values of 'a', 'r', and 'd', we need another equation. Since the first three terms are in a geometric progression, we know that:

(ar) / a = (ar^2) / (ar) (equation 3)

Simplifying equation 3, we get:
r = ar

Now we have three equations:

a = 12 (equation 1)
ar^2 + d = 452 (equation 2)
r = ar (equation 3)

Substituting equation 1 into equation 3, we get:
r = 12r

Dividing both sides by r (assuming r is not zero), we have:
1 = 12

This equation is not true, which means our assumption that r is not zero is incorrect. Therefore, r must be zero.

Substituting r = 0 into equation 2, we get:
ar^2 + d = 452
0 + d = 452
d = 452

Now we have found that r = 0 and d = 452. Substituting these values into equation 1, we find:
a = 12

So, the first number is 12, the second number is 12 * 0 = 0, the third number is 12 * 0^2 = 0, and the fourth number is 0 + 452 = 452.

The sum of the two middle numbers (0 + 0) is equal to 0.

Therefore, a + b = 12 + 0 = 12.

Hence, the value of a + b is 12.