Computer Science, asked by udayz, 4 months ago

Write a python program to print the nth term in the given series .2 is the first number in the series. 2,4,7,5,7,10,8,10,13…?​

Answers

Answered by chandrakantakesh73
0

Answer:

uhubhbjmjnh inhbhbjnjbhbjbjj

Explanation:

jbjbbjmomomkonjbhvgcfcybjbnombjb

Answered by ankhidassarma9
0

Answer:

def new_seq(n):

   if n==1 :

     return 2

   if n==2 :

     return 4

   if n==3 :

     return 7

   return new_seq(n-3) + 3

n1 = int(input("enter number"))

print(new_seq(n1))

print(new_seq(n1+1))

print(new_seq(n1+2))

Explanation:

  • 2,4,7,5,7,10,8,10,13.... is the given series.
  • 1st 3 terms are fixed.
  • 4th term is 3 more than 1st term , 5th is 3 more than 2nd term and so on.
  • Hence, nth term is 3 more than (n-3)th term.
Similar questions