Not getting any sort of lead for this question
for A=2, answer is 1
for A=4, all numbers with combination of A and A+1 except 1,2,3,6,7,11. So, answer is 30 (1+2+3+6+7+11)
Not getting any sort of lead for this question
for A=2, answer is 1
for A=4, all numbers with combination of A and A+1 except 1,2,3,6,7,11. So, answer is 30 (1+2+3+6+7+11)
Here is a pattern that I was able to derive. This is not a complete answer and you will have to refine it further.
This is for any given positive integer $A$, where all possible numbers $n$ need to be built using
$n = iA + j(A+1)$ where $i, j \in Z$ and $i, j \ge 0$
say $k = A - 1$
Numbers that you cannot make using $A, A + 1$ -
(1) $ \, 1$ to $A - 1$
(2) $ \,A+2$ to $2A-1$
(3) $ \,2A+3$ to $3A-1$
...
...
(A-2) $ \,(A-3)A + (A-2)$ to $A(A-2) -1$ ($2$ numbers)
(A-1) $ \,(A-2)A + (A-1)$ to $A(A-1) -1$ (just $1$ number and the largest number).
In other words, we can write it as
$S = \sum \limits_{i=1}^k \sum \limits_{j = 1}^{A - i} (i-1)A + (i -1) + j$
EDIT:
I tried to simplify and see if it came to the same answer as in Arthur's link -
$S = \sum \limits_{i=1}^k (i-1) (A + 1) (A - i) + \frac {(A - i) (A + 1 - i)} {2}$
$S = \frac {1}{2} \sum \limits_{i=1}^k (2A^2 + 2A + 1) i - (2A + 1) i^2 - A (A + 1)$
$S = \frac {1}{2} [\frac {A(A-1)(2A^2 + 2A + 1)}{2} - \frac {A(A-1)(2A-1)(2A+1)}{6} - A (A-1) (A + 1)]$
Simplifying I get $ \, S = \frac {(A-1)(A^3-A)}{6}$ which is same as in the link as there, the numbers are $n + 1, n + 2$ instead of $A, A + 1$.
I solved your problem (with no more than secondary-school mathematics). Here is the problem-solving strategy I used:
Following the terminology of the theory of numerical semigroups, let $S$ be the additive semigroup generated by $A$ and $A+1$. The set ${\Bbb N} − S$ is called the set of gaps in $S$ and is denoted by $G(S)$.
Since $A$ and $A+1$ are relatively prime, the largest number that is not in $S$ (called the Frobenius number of $S$), is $$ F(S) = A(A+1) - (A + (A+ 1)) = A^2 - A - 1. $$ and the size of $G(S)$ is $A(A-1)/2$.
The elements of $S$ lesser than or equal to $F(S)$ are of the form $kA + i$ with $0 \leqslant i \leqslant k$ and $1 \leqslant k <A$. The sum of these elements is \begin{align} \sum_{1 \leqslant k < A} \Bigl(\sum_{0 \leqslant i \leqslant k} (kA + i)\Bigr) &= \sum_{1 \leqslant k < A}k(k+1)(A + 1/2) \\ &= (A + 1/2)\sum_{1 \leqslant k < A}k(k+1) \\ &= (A + 1/2)2\binom{A}{3}= (2A + 1) \binom{A}{3} \end{align} It follows that the sum of the elements of $G(S)$ is \begin{align} F(S)(F(S) + 1)/2 - (2A + 1) \binom{A}{3} &= 3(A^2 - A - 1)A(A - 1)/6 - (2A + 1) A(A-1)(A-2)/6 \\ &= A(A-1)^2(A+1)/6 = (A-1)\binom{A+1}{3} \end{align} \begin{array}{c|cccccc} A&2&3&4&5&6&7\\ \hline \text{SUM}&1&8&30&80&175&336 \end{array}