0

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)

J.-E. Pin
  • 40,163
  • Welcome to MSE. It is in your best interest that you type your questions (using MathJax) instead of posting links to pictures. – José Carlos Santos Sep 26 '20 at 12:04
  • okay, sorry about that....... @JoséCarlosSantos – Neil Johnson Sep 26 '20 at 12:17
  • 1
    When you say any combination, they can only be added? Why can I not subtract them to get numbers lower than $A$? The question is not very clear on that. – Math Lover Sep 26 '20 at 12:24
  • Calculating the first six terms allowed me to find http://oeis.org/A002417 – Arthur Sep 26 '20 at 12:30
  • There is a general theorem that if $a$ and $b$ are coprime positive integers, then the maximal integer not representable in the form $ax + by$ (where $x\ge0, y\ge0$ are integers) is $c=ab-a-b$, and moreover, that the set of representable and non-representable integers turn into each other after symmetry with respect to the point $c/2$. This theorem should be enough to solve this problem, try to first use it and then prove it. – Wolfram Sep 26 '20 at 12:32
  • yes, @Arthur this is the one Thank you – Neil Johnson Sep 26 '20 at 12:52
  • You may want to start here. Admittedly the setting is a bit more general.there. – Jyrki Lahtonen Sep 26 '20 at 20:47

3 Answers3

1

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$.

Math Lover
  • 51,819
  • Thank you. I have to do the same program. I did the part A and it worked for A = 2, 3. I missed the part B and that is why it was not working for A = 4 or greater. Now I understand. Let me change the program and test. – Prags Sep 26 '20 at 13:36
0

I solved your problem (with no more than secondary-school mathematics). Here is the problem-solving strategy I used:

  1. For $A\leq 5$, write out all the numbers that cannot be written as a nonnegative integral linear combination of $A$ and $A+1$.
  2. Develop a conjecture on patterns of consecutive integers in those numbers.
  3. Prove the conjecture.
  4. Use formulae for sums of consecutive integers and sums of squares to arrive at a formula for the sum of those numbers.
K B Dave
  • 7,912
0

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}

J.-E. Pin
  • 40,163