Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I have solved http://projecteuler.net/problem=44 by getting the inverse equation from Wikipedia http://en.wikipedia.org/wiki/Pentagonal_number:

Pentagonal: $f(n) = \frac{n(3n - 1)}{2}$

Inverse Pentagonal: $n = \frac{\sqrt{24f(n) + 1}+1}{6}$

am interested in the steps from Pentagonal equation (quadratic?) to the Inverse.

I note that it is similar to What is the inverse of $f(n)=\frac{n^2+n}{2}$? and I've tried the same strategy:

$f(n) = \frac{n(3n - 1)}{2}$

*6 + 1 on each side

$6f(n) + 1 = 9n^2 -3n + 1$

but this isn't correct because I want:

$6f(n) + 1 = 9n^2 -6n + 1$

to give:

$(3n-1)^2$ on the right hand side

share|improve this question
    
You have multiplied by 6, try to multiply by 24 –  Aang Jun 29 '12 at 17:33

2 Answers 2

up vote 0 down vote accepted

To imitate the procedure used in the solution of the other problem, starting from $$2f(n)=3n^2-n,$$ multiply both sides by $12$. We get $$24f(n)=36n^2-12n.$$ Note that $36n^2-12n=(6n-1)^2-1$. The rest is easy. We get $(6n-1)^2=24f(n)+1$, then $6n-1=\sqrt{24f(n)+1}$, then $6n=\sqrt{24f(n)+1}+1$.

Another way to solve the same problem is to write our equation as $$3n^2-n-2f(n)=0,$$ and use the Quadratic Formula.

Remark: Look at the quadratic equation $ax^2+bx+c=0$, where $a\ne 0$. Multiply both sides by $4a$. We get the equivalent equation $$4a^2x^2+4abx+4ac=0.$$ Note that $4a^2x^2+4abx=(2ax+b)^2-b^2.$ So quickly we arrive at the equation $$(2ax+b)^2=b^2-4ac.$$ From this we conclude that $$2ax+b=\pm\sqrt{b^2-4ac},$$ and then straightforward algebra yields $$x=\frac{-b\pm\sqrt{b^2-4ac}}{2a},$$ the important Quadratic Formula.

share|improve this answer

From $f(n)=n(3n-1)/2 \implies 3n^2-n=2f(n)\implies 3n^2-n-2f(n)=0$.This is a quadratic equation which gives $n=\frac{1+\sqrt{1+24f(n)}}{6}$.

share|improve this answer
    
Many thanks too avatar - the aha moment for me was getting the quadratic formula to give me 6 which then gave me the clue as to how you got 24. –  Dave Mateer Jun 29 '12 at 17:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.