Computer Science, asked by annu27971, 10 months ago

Question: A Funny SeriesConsider a sequence of the form 0, 1, 1, 2, 4, 7, 13, 24, 44, 81, 149…Write a method Met which takes as parameter an integer n and prints the nth term of the above sequence. The nth term will fit in an integer value.Hint: Does this pattern look familiar? Remember the logic for Fibonacci series?Only write the method - assume that the Main class & main method have been defined.Example Input: 5Output: 4Example Input: 8Output: 24Example Input: 11Output: 149

Answers

Answered by Anonymous
12

Answer:

its a python program

Explanation:

#program to print the given series

n=int(input("enter the limit"))

f=0

s=1

t=1

print(f,s,t,end=" ")

for i in range(2,n):

  n=f+s+t

  print(n,end=" ")

  f,s,t=s,t,n

#HOPE IT HELPS YOU

PLEASE MARK BRAINLIEST

Similar questions