Goldbach’s Cardinality

Goldbach’s cardinality (GC) of an even number means the number of ways the even number can be expressed as summation of 2 different primes. For example 30 = 7 + 23 = 11 + 19 = 13 + 17. So Goldbach’s cardinality of 30 is 3. In other words we can write that GC(30) = 3. In this problem you will have to find the summation of Goldbach’s Cardinality of all even numbers within a certain range. Input The input file contains around 2000 line of input. Each line contains two integers low and high (0 < low ≤ high ≤ 107). Input is terminated by a line containing two zeroes. This line should not be processed. Output For each line of input you have to produce one line of output. This line contains the summation of Goldbach’s cardinality of all the even numbers within low and high (inclusive). In other words you will have to print the value of Sample Input 10 20 30 40 00 Sample Output 9 16 ⌊high/2⌋ ∑ GC (2m) m=⌊(low+1)/2⌋