Determining arithmetic progression using constraints

I have a list

lista={a1,a2,a3,a4,a5,a6,a7,a8,a9}

I'm trying to get the arithmetic progression using Solve with the following rules:

Solve[a3+a6==34&&a4+a9==50, {a1,a2,a3,a4,a5,a6,a7,a8,a9}]

Is there anything smarter to apply?

• There are conditions missing in order for this to be an arithmetic progression. They should be added to the equations. Mar 15 '18 at 18:04

lista = NestList[# + r &, a1, 20 - 1]
Solve[lista[] + lista[] == 34 &&
lista[] + lista[] == 50, {r, a1}] /. Rule -> Set
novalista = NestList[# + r &, a1, 20 - 1]

An arithmetic progression $\{a, a+d, a+2d, ...\}$ is defined by two terms, $a$ and $d$. So your problem is trivial:

Solve[(a + 2 d) + (a + 5 d) == 34 &&
(a + 3 d) + (a + 8 d) == 50,
{a, d}]

{{a -> 3, d -> 4}}

lista = {3, 7, 11, ...}

apQ = Equal @@ Differences @ # &;

lista /. Solve[a3 + a6 == 34 && a4 + a9 == 50 && apQ @ lista, lista][]

{3, 7, 11, 15, 19, 23, 27, 31, 35}

FindSequenceFunction @ %

-1 + 4 #1 &