What is the explicit formula for h(n)?

  • Context: Graduate 
  • Thread starter Thread starter erszega
  • Start date Start date
  • Tags Tags
    Sequence Type
Click For Summary

Discussion Overview

The discussion revolves around finding an explicit formula for the sequence h(n), which is defined as the sum of the first n+1 terms of another sequence g(n) defined by a recursive relation. Participants explore various methods to derive h(n), including recursive definitions, geometric series, and generating functions, while also discussing related sequences and properties.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • Post 1 introduces g(n) defined by a recurrence relation and seeks an explicit formula for h(n) based on g(n).
  • Post 2 suggests that h(n) can be computed directly from g(n) and proposes modifying h for simplification.
  • Post 3 presents an approximation of g(n) in terms of h(n) and discusses a related function G(n,m) with its own recursive definition.
  • Post 4 claims that h(n) can be evaluated as the sum of two geometric progressions.
  • Post 5 provides an explicit formula for h(n) derived from the geometric series approach.
  • Post 6 relates G(n,m) to h(n) using a formula involving powers of (1+sqrt(2)) and (1-sqrt(2)).
  • Post 7 and Post 8 identify the first sequence as Pell numbers and inquire about the origins of the second sequence.
  • Post 9 reiterates the recursive definition of h(n) and suggests using generating functions or undetermined coefficients for finding the explicit formula.
  • Post 10 discusses challenges with generating functions and presents a specific sequence u(n) related to Pythagorean triples.
  • Post 11 clarifies the method of generating functions and undetermined coefficients for deriving explicit formulas.
  • Post 12 shares findings using the generating function method and raises a conjecture about the integer solutions of Pythagorean triples.
  • Post 13 connects u(n) to the sequence of square triangular numbers and proposes an alternative explicit formula.
  • Post 14 presents a general relationship between two sequences defined by similar recurrence relations and seeks validation or references.

Areas of Agreement / Disagreement

Participants express various methods and approaches to derive h(n), but there is no consensus on a single explicit formula. Multiple competing views and techniques remain present throughout the discussion.

Contextual Notes

Some participants mention the use of generating functions and the method of undetermined coefficients, but there are unresolved mathematical steps and dependencies on definitions that affect the derivation of explicit formulas.

Who May Find This Useful

This discussion may be useful for those interested in recursive sequences, generating functions, and mathematical properties related to number theory and combinatorics.

erszega
Messages
36
Reaction score
0
Let g(n) = 2g(n-1) + g(n-2), g(0)=0, g(1)=1.
The explicit formula is g(n) = ((1+t)^n - (1-t)^n) / (2t), where t is sqrt(2).

Let h(n) = the sum of the first n+1 terms of g, ie h(n) = g(0)+g(1)+...+g(n).
Then a possible recursive definition of h(n) will be similar to that of g(n), except that 1 will have to be added to it each time:

h(n) = 2h(n-1) + h(n-2) + 1, h(0)=0, h(1)=1.

How can I find (or what is) the explicit formula for h(n), please?
 
Physics news on Phys.org
You can find h(n) directly -- you have the expression for g(n), and you know how to compute that sum explicitly.

If you really wanted to do it from the recursion, then you could modify h to get a simpler expression. For example, what would the recursion for k(n) = h(n) + a look like? Then, maybe you can find an a that makes it simple!
 
I admit I still haven't found the explicit formula for h(n), but, before finding it, there are other issues that seem to be interesting.

For instance, it seems that g(n) is approximately (h(n-1)+1/2)*sqrt(2), and the higher n, the closer the value of that formula is to g(n).
For example, h(6) = 0 + 1 + 2 + 5 + 12 + 29 + 70 = 119, and 119.5*sqrt(2) = 168.9985..., while g(7) = 169.

Further, let G(n,m) = 2G(n,m-1) + G(n,m-2), G(n,0)=2^n, G(n,1)=2^n.
eg
G(0,m) : 1, 1, 3, 7, 17, 41, 99, ...
G(1,m) : 2, 2, 6, 14, 34, 82, 198, ...
G(2,m) : 4, 4, 12, 28, 68, 164, 396, ...
G(3,m) : 8, 8, 24, 56, 136, 328, 792, ...
...
Now, it seems, G(n, m) = (h(m-1)+1/2)*2^{n+1}.

For example, with n= 3 and m = 6,
G(3,6) = 792, and h(6-1)=49, and indeed 49.5 * 2^4 = 792.
 
Last edited:
h(n) is just the sum of two geometric progressions. You can evaluate those.
 
Yes, thanks, of course, then I get h(n) = ((1+t)^{n+1} + (1-t)^{n+1} - 2) / 4, where t is sqrt(2).
 
and then G(n,m) = ( (1+sqrt(2))^m + (1-sqrt(2))^m ) * 2^{n-1}.
 
The first sequence is the Pell numbers, http://www.research.att.com/~njas/sequences/A000129 . How did the second sequence come up, out of curiosity?
 
Last edited by a moderator:
CRGreathouse said:
The first sequence is the Pell numbers, http://www.research.att.com/~njas/sequences/A000129 . How did the second sequence come up, out of curiosity?
I myself am familiar with this sequence (h(n)) and it is related to well known sequences in the Online Encyclopedia of integer sequences. Let A(n) = A000129 also the sequence b(n) = A001333. Then a(n)*b(n) = s(n) = A001109 where s(n) squared are equal to h(2n)*(h(2n)+1)/2, i.e., the square triangular numbers. Also h(n)=(b(n)-1)/2.
 
Last edited by a moderator:
erszega said:
Let g(n) = 2g(n-1) + g(n-2), g(0)=0, g(1)=1.
The explicit formula is g(n) = ((1+t)^n - (1-t)^n) / (2t), where t is sqrt(2).

Let h(n) = the sum of the first n+1 terms of g, ie h(n) = g(0)+g(1)+...+g(n).
Then a possible recursive definition of h(n) will be similar to that of g(n), except that 1 will have to be added to it each time:

h(n) = 2h(n-1) + h(n-2) + 1, h(0)=0, h(1)=1.

How can I find (or what is) the explicit formula for h(n), please?
If you didn't know that h(n) is the sum of two geometric sequences, you can use generating functions or the method of undetermined coefficients.
 
Last edited:
  • #10
Thanks for all the help and the useful comments.

Sorry for not answering your question earlier, CRGreathouse, but I cannot provide any revealing answer - I think I was playing with the numbers in Excel, searching for patterns.


Orthodontist, thanks, but I haven't heard about the method of undetermined coefficients. As far as generating functions are concerned, I do not find them very easy:

For instance, consider u(n) = 6u(n-1)-u(n-2), u(0)=1, u(1)=5 (a fascinating sequence, giving the values of the hypothenuse, or c, in Pythagorean triples a^2+b^2=c^2, where |a-b|=1, see http://www.research.att.com/~njas/sequences/A001653 ).

As far as generating functions are concerned, I can get as far as this:

(i) u(x) = u(0) + u(1)*x + u(2)*x^2 + ... + u(n)*x^n + ...

multiply (i) by -6x:

(ii) -6x*u(x) = -6*u(0)*x - 6*u(1)*x^2 - 6*u(2)*x^3 - ... - 6*u(n)*x^{n+1} - ...

multiply (i) by x^2:

(iii) x^2*u(x) = u(0)*x^2 + u(1)*x^3 + u(2)*x^4 + ... + u(n)*x^{n+2} + ...

Then add (i), (ii), and (iii):

u(x)*(1 - 6x + x^2) = u(0) + x*(u(1) - 6*u(0)) + x^2 * (u(2) - 6*u(1) + u(0)) + ... + x^n * ( u(n) - 6*u(n-1) + u(n-2) ) + ...

As u(0)=1 and u(1)=5, I get

u(x) = (1 - x)/(1 - 6x + x^2).

I can of course find the roots of x^2 - 6x + 1:
a = 3 + 2*sqrt(2), and
b = 3 - 2*sqrt(2).

But I am stuck there. How do I get to the explicit formula?
 
Last edited by a moderator:
  • #11
Instead of u(x) I guess you mean f(x). You have the roots a and b, so your fraction is
[tex]\frac{1-x}{(x-a)(x-b)}[/tex]
Now you expand by partial fractions to get
[tex]\frac{A}{x-a}+\frac{B}{x-b}[/tex]
where [tex]A = \frac{1-a}{a-b}[/tex]
and [tex]B = \frac{1-b}{b-a}[/tex]
Dividing top and bottom by -a or -b for your two fractions, you can see that the solution sequence is the sum of two geometric sequences, one with first term -A/a and ratio 1/a, and the other with first term -B/b and ratio 1/b, which checks out.

By the way, your method is a little weird. The way I learned it, you multiply the whole thing through by x^n, sum over all n, rewrite in terms of the generating function f(x), then solve for f(x).


The method of undetermined coefficients works by knowing (from a table or memory) the general forms of sequences up to constant coefficients, and then solving for the coefficients. In this case u is a homogeneous sequence, where only constant multiples of u appear in the definition, so one solution of u(n) is Crn for some C and r. Substitute that back into the sequence definition and simplify, giving you the equation
r2-6r+1 = 0
So r happens to be either a or b that you mentioned earlier. The general solution for the series is
u(n) = C1a^n+C2b^n. Use the fact that you know the first few terms of the series to solve for C1 and C2.
C1 + C2 = 1
aC1 + bC2 = 5
C2 = [tex]\frac{5-a}{b-a}[/tex]

C1 = [tex]\frac{b-5}{b-a}[/tex]
and now you have determined the sequence.
 
Last edited:
  • #12
Thank you.
Then, using the generating function method, with a= 3 + 2*sqrt(2), and b = 3 - 2*sqrt(2),
A = (-1-sqrt(2)) / (2*sqrt(2)), and B = (1-sqrt(2)) / (2*sqrt(2)),

and so

u(n) = -A/a^{n+1} - B/b^{n+1}.

This works, but it is not as nice as I thought it would be, especially with the (n+1)th power in the denominators.

However, going back to an interesting property of the u(n) sequence, I wonder if there is a proof for the following statement (if true):

The sequence u(n) = 6*u(n-1) - u(n-2), u(0)=1, u(1)=5 generates all and only the integer solutions in c of a^2 + b^2 = c^2 where |a-b|=1.
 
  • #13
u(n) = 6*u(n-1)-u(n-2), u(0)=1, u(1)=1 (this yields the same sequence as with the choices u(0)=1 and u(1)=5) is also the difference sequence of the sequence of the square roots of square triangular numbers:
S(n) = 6*S(n-1)-S(n-2), S(0)=0, S(1)=1, that is

u(n)=S(n)-S(n-1).

This has two consequences:
(1) another explicit formula for u(n) can be simply derived from the explicit formula of S(n),
(2) the statement in post 12 can be rephrased as : the difference between the square roots of two consecutive square triangular numbers is the hypothenuse, or c, of a Pythagorean triple a^2 + b^2 = c^2, where |a-b| = 1.

Just to note that yet another formula seems to work:

u(n) = ( (1 + sqrt(2))^{2*n-1} - ((1 - sqrt(2))^{2*n-1} ) / ( 2*sqrt(2) ), for the same sequence as
u(n) = 6*u(n-1)-u(n-2), u(0)=1, u(1)=1 .

Sorry if I just repeated something that has already been stated somewhere (for instance there is a lot of related info, with links and references, at http://www.research.att.com/~njas/sequences/A001653 ).
 
Last edited by a moderator:
  • #14
I have found something that may be well known, and so I would appreciate either a link or reference, or some help towards proving this:

Let
f(n) = a*f(n-1) + b*f(n-2), f(0) = 0, f(1) = 1, and
g(n) = a*g(n-1) + b*g(n-2), g(0) = A, g(1) = B. Then
g(n) = B*f(n) + A*b*f(n-1).

The advantage in this is that once we know the closed form expression for f(n), it is easy to derive the formula for g(n), with any initial values A and B.
 

Similar threads

  • · Replies 26 ·
Replies
26
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 21 ·
Replies
21
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 5 ·
Replies
5
Views
1K
  • · Replies 22 ·
Replies
22
Views
4K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
Replies
34
Views
3K