well
aritmetic is
an=a1+d(n-1)
so
first will be a1
7th is a1+6d
4th is a1+3d
let's say that a1=x and d=y for niceness sake
so
sum of first and 7th is 40
x+x+6y=40
2x+6y=40
divide 2
x+3y=20
product of first and 4th is 160
x times (x+3y)=160
hold a sec, from previous problem, x+3y=20
x times 20=160
divide both sides by 20
x=8
sub back
x+3y=20
8+3y=20
minus 8 both sides
3y=12
divide by 3
y=4
an=8+4(n-1) is da equation
to find the terms, subsitute
frst is 8
2nd is 12
etc
the first 8 terms are
8,12,16,20,24,28,32,36