I want to print Alternate A.P and G.P series like:
- 2 2 4 6 6 18 8 54 10 162 12 486... i.e (A1 G1 A2 G2 A3 G3 .....)
here variable is with literal meaning asinged below. I found in form of
[(2, 2), (4, 6), (6, 18), (8, 54), (10, 162), (12, 486), (14, 1458),
(16, 4374), (18, 13122), (20, 39366)]
How can I find as expected?
a,d,r,length=2,2,3,10
lst=[( a+(n-1)*d, a*r**(n-1) ) for n in range(1,length+12)]
print(lst)