MHB Generate Sequences Divisible by 24 with 5n+1 & 7n+1

  • Thread starter Thread starter MarkFL
  • Start date Start date
  • Tags Tags
    Sequence
AI Thread Summary
When both expressions \(5n+1\) and \(7n+1\) are perfect squares, \(n\) must be divisible by 24. A method to generate such \(n\) involves solving the Diophantine equation \(7p^2 - 5q^2 = 2\) derived from the perfect square conditions. The solutions can be generated using the recurrence relation \(p_k = 12p_{k-1} - p_{k-2}\) for \(p_k\) and \(q_k\). While a closed-form solution for \(n_k\) has not been found, a recursive algorithm can effectively generate the sequence of valid \(n\). This discussion emphasizes the relationship between number theory and recursive sequences in generating specific integer values.
MarkFL
Gold Member
MHB
Messages
13,284
Reaction score
12
It can be shown that when $5n+1$ and $7n+1$ (where $n\in\mathbb{N}$) are both perfect squares, then $n$ is divisible by $24$.

Find a method for generating all such $n$.
 
Mathematics news on Phys.org
MarkFL said:
It can be shown that when $5n+1$ and $7n+1$ (where $n\in\mathbb{N}$) are both perfect squares, then $n$ is divisible by $24$.

Find a method for generating all such $n$.
Partial solution: [sp]If $5n+1=p^2$ and $7n+1=q^2$ then $35n+7 = 7p^2$ and $35n+5 = 5q^2$. Subtract, to get $7p^2 - 5q^2 = 2$. That is a Diophantine equation, which you can solve by looking at the continued fraction expansion of $\sqrt{5/7}$. If the $k$th solution is $(p_k,q_k)$, then the first few solutions, with the corresponding values $n_k$ of $n$ are $$\begin{array}{c|c|c|c}p_k&q_k&n_k&n_k/24 \\ \hline 1&1&0&0 \\ 11&13&24&1 \\ 131 & 155 & 3432 & 143 \\ 1561 & 1847 & 487344 & 20306 \\18601 & 22009 & 69199440 & 2883310 \end{array}$$

The numbers $p_k$ satisfy the recurrence relation $p_k = 12p_{k-1} - p_{k-2}$, and $q_k$ satisfies the same recurrence relation. That enables you to generate all the values of $n$, but I have not been able to find an explicit formula for $n_k.$[/sp]
 
Opalg said:
Partial solution: [sp]If $5n+1=p^2$ and $7n+1=q^2$ then $35n+7 = 7p^2$ and $35n+5 = 5q^2$. Subtract, to get $7p^2 - 5q^2 = 2$. That is a Diophantine equation, which you can solve by looking at the continued fraction expansion of $\sqrt{5/7}$. If the $k$th solution is $(p_k,q_k)$, then the first few solutions, with the corresponding values $n_k$ of $n$ are $$\begin{array}{c|c|c|c}p_k&q_k&n_k&n_k/24 \\ \hline 1&1&0&0 \\ 11&13&24&1 \\ 131 & 155 & 3432 & 143 \\ 1561 & 1847 & 487344 & 20306 \\18601 & 22009 & 69199440 & 2883310 \end{array}$$

The numbers $p_k$ satisfy the recurrence relation $p_k = 12p_{k-1} - p_{k-2}$, and $q_k$ satisfies the same recurrence relation. That enables you to generate all the values of $n$, but I have not been able to find an explicit formula for $n_k.$[/sp]

Good work, Opalg! (Clapping)

I was not necessarily asking for a closed form solution; a recursive algorithm fits the bill for finding a method to generate the sequence. :D

I will post my solution within 24 hours. (Nerd)
 
My solution:

Let:

(1) $$5n+1=p^2$$

Since both squares have the same parity, their difference is even, and so we may let:

(2) $$7n+1=(p+2k)^2$$ where $$k\in\mathbb{N}$$

Subtracting (1) from (2), we obtain:

$$2n=(p+2k+p)(p+2k-p)=4k(p+k)$$

$$n=2k(p+k)$$

Substituting for $n$ into (1), we have:

$$5(2k(p+k))+1=p^2$$

$$p^2-10kp-\left(10k^2+1 \right)=0$$

Taking the positive root for $p$, we obtain:

$$p=5k+\sqrt{35k^2+1}$$

A sequence defined recursively by:

$$A_{n+1}=sA_{n}+tA_{n-1}$$

will have limiting values of:

$$L=\lim_{n\to\pm\infty}\frac{A_{n+1}}{A_{n}}=\frac{s\pm\sqrt{s^2+4t}}{2}$$

Observing that for $$s=12,t=-1$$ we have:

$$L=\lim_{n\to\pm\infty}\frac{A_{n+1}}{A_{n}}=6\pm \sqrt{35}$$

Thus, we find $p$ may be given in closed form by:

$$p_{m}=c_1\left(6+\sqrt{35} \right)^m+c_2\left(6-\sqrt{35} \right)^m$$ where $p_0=1,\,p_1=11$

The initial values are obtained from $n=0,\,24$. We may now determine the parameters $c_i$ from the initial values:

$$p_{0}=c_1+c_2=1\,\therefore\,c_2=1-c_1$$

$$p_{1}=c_1\left(6+\sqrt{35} \right)+\left(1-c_1 \right)\left(6-\sqrt{35} \right)=11$$

Hence:

$$c_1=\frac{7+\sqrt{35}}{14},\,c_2=\frac{7-\sqrt{35}}{14}$$

And so we have:

$$p_{m}=\frac{1}{14}\left(\left(7+\sqrt{35} \right)\left(6+\sqrt{35} \right)^m+\left(7-\sqrt{35} \right)\left(6-\sqrt{35} \right)^m \right)$$

Now, using the relationship between $n$ and $p$ in (1), we have:

$$n=\frac{p^2-1}{5}$$

Hence:

$$n_m=\frac{\left(\frac{1}{14}\left(\left(7+\sqrt{35} \right)\left(6+\sqrt{35} \right)^m+\left(7-\sqrt{35} \right)\left(6-\sqrt{35} \right)^m \right) \right)^2-1}{5}$$
 
And this is yet another example of why I am an engineering major...
Sorry for interrupting with a somewhat "useless" post. Carry on.
 
alane1994 said:
And this is yet another example of why I am an engineering major...
Sorry for interrupting with a somewhat "useless" post. Carry on.

Difference equations...they're comin' for ya... (Devil) (Tauri) (Giggle)
 
alane1994 said:
And this is yet another example of why I am an engineering major...
Sorry for interrupting with a somewhat "useless" post. Carry on.

Weren't you posting problems with differential equations?
I found http://mathhelpboards.com/chat-room-9/interesting-pics-6646.html#post30284 by masters[/color] rather funny and very true.
Sorry for another interrupting an somewhat useless post. :o
 
Back
Top