0
$\begingroup$

I have a sequence a[n] with

$$a(n+1)=4 a(n)-2 a(n-1),\quad a(0) = 1,\ a(1) = 28.$$

I use

RSolve[{a[n + 1] == 4 a[n] - 2  a[n - 1], a[0] == 1, a[1] == 28}, a, n]

and got

{{a -> Function[{n}, 1/2 ((2 - Sqrt[2])^n - 13 Sqrt[2] (2 - Sqrt[2])^n + (2 + Sqrt[2])^n + 13 Sqrt[2] (2 + Sqrt[2])^n)]}}

Now I tried to find an integer k such that a[n]==k^2, k from 1 to 100.

Reduce[{1/2 ((2 - Sqrt[2])^n - 13 Sqrt[2] (2 - Sqrt[2])^n + (2 + Sqrt[2])^n + 13 Sqrt[2] (2 + Sqrt[2])^n) == k, 1 <= k <= 100,2 <= n <= 100}, {k, n}, Integers]

I got the answer

False

Is there an integral number k that satisfies the equation a[n] == k^2 ($n \neq 0$)?

$\endgroup$
  • $\begingroup$ a[0]==1==1^2? $\endgroup$ – Kagaratsch Jun 10 at 14:55
  • $\begingroup$ Did you mean to write == k^2 rather than == k? $\endgroup$ – JimB Jun 10 at 15:00
  • $\begingroup$ @JimB a[n]=1, 4, 9, .... $\endgroup$ – minhthien_2016 Jun 10 at 15:06
  • 3
    $\begingroup$ Would the following be a more direct brute force approach: nMax = 1000; Select[ Sqrt[Table[ Expand[1/ 2 ((2 - Sqrt[2])^n - 13 Sqrt[2] (2 - Sqrt[2])^n + (2 + Sqrt[2])^n + 13 Sqrt[2] (2 + Sqrt[2])^n)], {n, nMax}]], # \[Element] Integers &]. $\endgroup$ – JimB Jun 10 at 15:14
  • 1
    $\begingroup$ No perfect squares in the first 100000 elements. $\endgroup$ – bbgodfrey Jun 10 at 20:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.