# The Buses and the Mathematics

**Number Theory**Level 2

The image above shows an inside view of a bus, with a total number of **c** chairs. Consider that its chairs are numbered in ascending order and that this bus has an infinite space. A row of chairs is a line that contains chairs with numbers x, (x+1), (x+2), ..., y, where y is the number of the last chair of a row and x, the first. The numbers *x* and *y* also represent the chairs that are on the windows of that row. The total number of chairs is **\(c = 40\)**.

Let **\(A_{k}n\)** be the set that contains the sum of the numbers of each row, where *k* is the number of rows and *n* is the number of chairs on each row . Hence, the elements of \(A_{k}n\) are {\(S_{r1}\), \(S_{r2}\), \(S_{r3}\),..., \(S_{rk}\)}, where \(S_{r}\) is the sum of the numbers of a row *r* and *rk* is the last row of chairs. It is noticeable that k is directly dependent on the value of n. For instance, for n = 20, k must be 2, because the total number of chairs is 40.

This set has a property: sometimes, on a certain row, x and/or y are prime numbers. Yet, these rows that contain prime numbers on the windows sometimes also have *\(S_{r}\) = p*, where p is also a prime number.

For 1 < n ≤ 10, what is the sum of all the possible values of p?

**Details and Assumptions**

All the numbers are positive integers.

For a certain value of n,

*all*the rows must have a number of n chairs.At a row with prime numbers on the windows, x

*or*y can be prime numbers. It is not a rule that it must be both of them.The elements of the set \(A_{k}n\) depend on the value of n, and so does the value of k. Considering c = 30, a set \(A_{2}15\) does not have the same elements as a set \(A_{3}10\).