Trying to figure out some recursive algorithm using python new to the language can anyone with knowledge offer any help would greately appriciated.
so far have done to get n = 2n - 1
def new(n):if n == 1: return 1return 1 + 2 * new(n-1)
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Farhan AhmedRank #73 · 25K reputationPosted Jun 30, 2020, 8:50 PM EDT