Post History
Python 3, 39 bytes f=lambda x:x if x<2else 2*f(x-1)+f(x-2) Generic recursive implementation Try it online!
Answer
#1: Initial revision
# [Python 3], 39 bytes <!-- language-all: lang-python --> f=lambda x:x if x<2else 2*f(x-1)+f(x-2) Generic recursive implementation [Try it online!][TIO-kl9k64hu] [Python 3]: https://docs.python.org/3/ [TIO-kl9k64hu]: https://tio.run/##K6gsycjPM/7/P802JzE3KSVRocKqQiEzTaHCxig1pzhVwUgrTaNC11BTG0QZaf4vKMrMK9FI0zDR1PwPAA "Python 3 – Try It Online"