The Perrin sequence is a series of numbers where:P(1) = 3, P(2) = 0, P(3) = 2 P(n) = P(n-2) + P(n-3) for n > 3 The sequence begins: 3, 0, 2, 3, 2, 5, 5, 7, 10, 12, 17, ...Write a Python program to find a given number in the Perrin sequence.Use this to determine what is the sum of the 40th number and the 47th number in the Perrin sequence?Verification:4th Perrin number = 3 7th Perrin number = 5 Sum of 4th and 7th = 8 You may use the following for this question.Python InterpretersOnline Python Interpreter - online editor (onlinegdb.com) Python Tutor: Learn Python, JavaScript, C, C++, and Java programming by visualizing codeOnline Python Compiler (Interpreter) (programiz.com)Python ResourcesLearn Python Programming (programiz.com) Python Tutorial (w3schools.com)3.11.7 Documentation (python.org)https://www.pythoncheatsheet.org/多项选择题
A
20,357,360
B
20,357,580
C
20,357,470 ✓
D
20,357,690
E
20,357,250
F
20,357,800
G
20,357,140
H
20,357,910
I
20,357,030
J
20,358,020
登录即可查看完整答案
我们收录了全球超50000道真实原题与详细解析,现在登录,立即获得答案。
类似问题
A sequence is defined by the recurrence relation fn=n⋅fn−1−fn−3. How many initial values are required so that the sequence is well defined for all n≥0?
A sequence {bn} is defined as follows: b1=3, b2=0, and bn=n2⋅bn−1−(bn−2)2−2. for n≥3, What is b3?
A sequence is defined by the recurrence relation fn=n⋅fn−1−fn−3. How many initial values are required so that the sequence is well defined for all n≥0?
A sequence {an} is defined as follows: a0=3, a1=1, and an= (an−1⋅an−2 − 2). for n≥2, What is a3?
更多留学生实用工具
希望你的学习变得更简单
加入我们,立即解锁 海量真题 与 独家解析,让复习快人一步!