Pure Recursive Function for f(n) = 6[SUP]n[/SUP] + 6n

In summary, a 'Pure Recursive Function' is defined by only using previous values of the function and not having any stray variables. The goal is to find a recursive function for 6^n + 6n. After some trial and error, a recursive function of f(n+1) = 6f(n) - 30n + 6 can be derived by using algebraic manipulations and substituting previous values of the function.
  • #1
lpau001
25
0
"Pure Recursive Function" for f(n) = 6n + 6n

Howdy! First of all I was going to explain a 'Pure Recursive Function' as how my professor defined it: A pure recursive function is stated by only using previous values of the function.. Like: F(n) = f(n-1) + f(n-2) Which means you can't have a stray 'n' in the function.. Hard to explain, but maybe it will make more sense if I continue.

Homework Statement


Find a pure recursive function of [itex]6^{n}[/itex] +6n, if it exists.


Homework Equations


I started off by writing down the first few values..
f(1) = 12
f(2) = 48
f(3) = 234
f(4) = 1320
f(5) = 7806
f(6) = 46692


The Attempt at a Solution


After a few minutes of messing around with the numbers, I came up with this recursive function.

f(n) = 6[f(n-1) - (n[5]-6)]

I was feeling great, because it works and it only took me like 10 minutes to figure out! woohoo! EXCEPT when I asked my professor about it, he said that's great, but it's not a 'Pure Recursive Definition' because of the (n[5]-6) that 'n' has nothing to do with previous values of the function, so it's not a 'pure' recursive function!

Anyways.. On to the REAL problem!

How would I find a pure recursive definition? I've noticed that the limit of the function as n approaches infinity of F(n+1) / F(n) = 6. So I was multiplying the 'last' value of the function by 6, and then subtracting a constant to get the current value. What's interesting is that the constant goes up by 30 each time! (starts out at 24 for f(2), then 54, 84 ...etc.) so like f(5) = 6f(4) - 114 ...Ok, so how do I relate that constant to a previous value? I can't think of a good way.. I also tried multiplying the previous value by 5, and adding that constant, but its way too large..

Anyways, I've been stuck on this for a few days. I'm wondering if I need to try some more complex algebra stuff instead of just simple division and addition / subtraction.

Thanks for any help!
 
Last edited:
Physics news on Phys.org
  • #2


Try this:

[itex]f(n) = 6^n + 6n[/itex] ---eqn 1

[itex]f(n+1) = (6)(6^n) + 6n + 6[/itex] --eqn 2

Rearrange eqn 1 to get:

[itex]6^n = f(n) - 6n[/itex] ---eqn 3

Sub eqn 3 into eqn 2:

[itex]f(n+1) = 6f(n) - 36n + 6n + 6 = 6f(n) - 30n + 6[/itex] ---eqn 4

Now find a similar expression for f(n-1) like in eqn 2, and again replace the 6n term with eqn 3. Multiply the resulting equation by a certain constant so that you can now add it to eqn 4 and cause the terms in n to cancel out. Just rearrange to get the form you want, and you're done.
 
  • #3


Curious3141 said:
Try this:

[itex]f(n) = 6^n + 6n[/itex] ---eqn 1

[itex]f(n+1) = (6)(6^n) + 6n + 6[/itex] --eqn 2

Rearrange eqn 1 to get:

[itex]6^n = f(n) - 6n[/itex] ---eqn 3

Sub eqn 3 into eqn 2:

[itex]f(n+1) = 6f(n) - 36n + 6n + 6 = 6f(n) - 30n + 6[/itex] ---eqn 4

Now find a similar expression for f(n-1) like in eqn 2, and again replace the 6n term with eqn 3. Multiply the resulting equation by a certain constant so that you can now add it to eqn 4 and cause the terms in n to cancel out. Just rearrange to get the form you want, and you're done.


Wow.. Simply Amazing!

I really need to work more on using the function to help me out, instead of just trying to figure out how the function works!

You really made this problem look easy! Thank you very much!
 
  • #4


lpau001 said:
Wow.. Simply Amazing!

I really need to work more on using the function to help me out, instead of just trying to figure out how the function works!

You really made this problem look easy! Thank you very much!

You're welcome. :smile:
 

Related to Pure Recursive Function for f(n) = 6[SUP]n[/SUP] + 6n

1. What is a pure recursive function?

A pure recursive function is a function that calls itself repeatedly until a base case is reached. It does not use any external variables or data structures in its calculation.

2. What is the formula for the function f(n) = 6n + 6n?

The formula for this function is f(n) = 6n + 6n, where n is the input value.

3. How does the function f(n) = 6n + 6n work?

The function works by repeatedly multiplying 6 to itself n times and adding 6n to the result. This process is repeated until the base case is reached, which is when n = 0.

4. What is the time complexity of the pure recursive function for f(n) = 6n + 6n?

The time complexity of this function is O(2n), as it requires exponential time to compute due to its recursive nature.

5. Can a pure recursive function be optimized?

Yes, a pure recursive function can be optimized by using techniques such as memoization, which stores previously calculated values to avoid repeating unnecessary calculations. This can greatly improve the time complexity of the function.

Similar threads

Replies
1
Views
641
Replies
27
Views
5K
  • Calculus and Beyond Homework Help
Replies
15
Views
2K
  • Calculus and Beyond Homework Help
Replies
20
Views
3K
Replies
5
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
5
Views
3K
  • Calculus and Beyond Homework Help
Replies
8
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
2K
  • Other Physics Topics
Replies
8
Views
2K
  • Calculus and Beyond Homework Help
Replies
10
Views
2K
Back
Top