Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4. The half-companion Pell numbers H, and the Pell numbers Pn can be defined by the following paired recurrence relations. Notice H, is defined in

image text in transcribedimage text in transcribed

4. The half-companion Pell numbers H, and the Pell numbers Pn can be defined by the following paired recurrence relations. Notice H, is defined in terms of both H, and Pn. So is Pre i if n=0 Hn= ..+2P-1 otherwise o if n=0 " H,-1+Pn-1 otherwise (a) Provide a SCHEME function, named (H n) which takes one parameter, n, and returns the half-companion Pell number at index n using the recurrence relation above. (b) Provide a SCHEME function, named (Pn) which takes one parameter, n, and returns the Pell number at index n using the recurrence relation above. 00 0000 0000 00000 0000000 00000000 000000 COCO OOO000 OOO000 00000 OOOOOO Figure 1: 36 circles arranged in a triangle as well as a square. A triangular number counts objects arranged in an equilateral triangle. The nth triangular number is the number of objects arranged in an equilateral triangle with n items along each side. A square triangular number is a triangular number that is also a perfect square. The problem of finding square triangular numbers reduces to Pell's equation in that every triangular number is of the form (0+1). Therefore we seek integers t and s such that "* = sa. (c) Define a SCHEME function named (t n) to compute the t value for the nth triangular square. Use the following definition to write your function: 2P2 if n is even tn = 142 if n is odd 4. The half-companion Pell numbers H, and the Pell numbers Pn can be defined by the following paired recurrence relations. Notice H, is defined in terms of both H, and Pn. So is Pre i if n=0 Hn= ..+2P-1 otherwise o if n=0 " H,-1+Pn-1 otherwise (a) Provide a SCHEME function, named (H n) which takes one parameter, n, and returns the half-companion Pell number at index n using the recurrence relation above. (b) Provide a SCHEME function, named (Pn) which takes one parameter, n, and returns the Pell number at index n using the recurrence relation above. 00 0000 0000 00000 0000000 00000000 000000 COCO OOO000 OOO000 00000 OOOOOO Figure 1: 36 circles arranged in a triangle as well as a square. A triangular number counts objects arranged in an equilateral triangle. The nth triangular number is the number of objects arranged in an equilateral triangle with n items along each side. A square triangular number is a triangular number that is also a perfect square. The problem of finding square triangular numbers reduces to Pell's equation in that every triangular number is of the form (0+1). Therefore we seek integers t and s such that "* = sa. (c) Define a SCHEME function named (t n) to compute the t value for the nth triangular square. Use the following definition to write your function: 2P2 if n is even tn = 142 if n is odd

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Solaris 11.2 System Administration (oracle Press)

Authors: Harry Foxwell

1st Edition

007184421X, 9780071844215

More Books

Students also viewed these Databases questions

Question

Define intercultural conflict

Answered: 1 week ago