Does $(n+1)(n-2)x_n+1=n(n^2-n-1)x_n-(n-1)^3x_n-1$ with $x_2=x_3=1$ define a sequence that is integral at prime indices?Generalized Fibonacci Sequence QuestionA good way to find $a_50000$ where $a_n$ is a number in the form of $2^jcdot 3^k$Proof that $x^2 - 2y^2 = -1$ has a recurring solution for $x$Proving a Pellian connection in the divisibility condition $(a^2+b^2+1) mid 2(2ab+1)$A man died. Let's divide the estate!!! How?Series over $ x_n^2 $ diverges. Find sequence $ y_n^2 $ such that series over $ y_n^2 $ converges and series over $ x_n y_n $ divergesA recurrence involving the radical of an integerOn integer sequences of the form $sum_n=1^N (a(n))^2H_n^2,$ where $H_n$ is the $n$th harmonic number: refute my conjecture and add yourself exampleHow to evaluate series based on recurrence equationFind values of $a$ for which the function is periodic.

In what cases must I use 了 and in what cases not?

Brake pads destroying wheels

Existence of a celestial body big enough for early civilization to be thought of as a second moon

Can you move over difficult terrain with only 5 feet of movement?

Is it insecure to send a password in a `curl` command?

How to get the n-th line after a grepped one?

Probably overheated black color SMD pads

Suggestions on how to spend Shaabath (constructively) alone

How could an airship be repaired midflight?

Relation between independence and correlation of uniform random variables

Pronounciation of the combination "st" in spanish accents

Light propagating through a sound wave

Does the attack bonus from a Masterwork weapon stack with the attack bonus from Masterwork ammunition?

How do hiring committees for research positions view getting "scooped"?

World War I as a war of liberals against authoritarians?

What is the term when voters “dishonestly” choose something that they do not want to choose?

Matrix using tikz package

What (if any) is the reason to buy in small local stores?

In Aliens, how many people were on LV-426 before the Marines arrived​?

Is there a hypothetical scenario that would make Earth uninhabitable for humans, but not for (the majority of) other animals?

Do US professors/group leaders only get a salary, but no group budget?

Generic TVP tradeoffs?

Maths symbols and unicode-math input inside siunitx commands

Do I need to consider instance restrictions when showing a language is in P?



Does $(n+1)(n-2)x_n+1=n(n^2-n-1)x_n-(n-1)^3x_n-1$ with $x_2=x_3=1$ define a sequence that is integral at prime indices?


Generalized Fibonacci Sequence QuestionA good way to find $a_50000$ where $a_n$ is a number in the form of $2^jcdot 3^k$Proof that $x^2 - 2y^2 = -1$ has a recurring solution for $x$Proving a Pellian connection in the divisibility condition $(a^2+b^2+1) mid 2(2ab+1)$A man died. Let's divide the estate!!! How?Series over $ x_n^2 $ diverges. Find sequence $ y_n^2 $ such that series over $ y_n^2 $ converges and series over $ x_n y_n $ divergesA recurrence involving the radical of an integerOn integer sequences of the form $sum_n=1^N (a(n))^2H_n^2,$ where $H_n$ is the $n$th harmonic number: refute my conjecture and add yourself exampleHow to evaluate series based on recurrence equationFind values of $a$ for which the function is periodic.













31












$begingroup$


My son gave me the following recurrence formula for $x_n$ ($nge2$):




$$(n+1)(n-2)x_n+1=n(n^2-n-1)x_n-(n-1)^3x_n-1tag1$$
$$x_2=x_3=1$$




The task I got from him:



  • The sequence has an interesting property, find it out.

  • Make a conjecture and prove it.

Obviously I had to start with a few values and calculating them by hand turned out to be difficult. So I used Mathematica and defined the sequence as follows:



b[n_] := b[n] = n (n^2 - n - 1) a[n] - (n - 1)^3 a[n - 1];
a[n_] := a[n] = b[n - 1]/(n (n - 3));
a[2] = 1;
a[3] = 1;


And I got the following results:



$$ a_4=frac74, a_5=5, a_6=frac1216, a_7=103, a_8=frac50418, a_9=frac403219, \ a_10=frac36288110, a_11=329891, a_12=frac3991680112, a_13=36846277, a_14=frac622702080114dots$$



Numbers don't make any sense but it's strange that the sequence produces integer values from time to time. It's not something that I expected from a pretty complex definition like (1).



So I decided to find the values of $n$ producing integer values of $a_n$. I did an experiment for $2le n le 100$:



table = Table[i, a[i], i, 2, 100];
integers = Select[table, (IntegerQ[#[[2]]]) &];
itegerIndexes = Map[#[[1]] &, integers]


...and the output was:



2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 
59, 61, 67, 71, 73, 79, 83, 89, 97


Conjecture (pretty amazing, at least to me):




$a_n$ is an integer if and only if $n$ is prime.




Interesting primality test, isn't it? The trick is to prove that it's correct. I have started with the substitution:



$$y_n=n x_n$$



...which simplifies (1) a bit:



$$(n-2)y_n+1=(n^2-n-1)y_n-(n-1)^2y_n-1$$



...but I did not get much further (the next step, I guess, should be rearrangement).










share|cite|improve this question











$endgroup$







  • 2




    $begingroup$
    The fact that this sequence starts with the first prime index looks like a huge hint, seeing as mathematicians would start with n= 1 and software devs with n = 0 :-)
    $endgroup$
    – Carl Witthoft
    2 days ago






  • 2




    $begingroup$
    If you're interested in returning the favor to your son, there are Diophantine Equations which enumerate all primes. The result is an inequality such that, if this polynomial function (whose inputs are 26 whole numbers labeled a through z) is greater than zero, then k, the 11th argument to the function, is prime, and every prime on the entire numberline is enumerated this way.
    $endgroup$
    – Cort Ammon
    2 days ago







  • 2




    $begingroup$
    Looking at OEIS reveals origins of this problem, numerators are oeis.org/A005450, denominators are oeis.org/A005451, and in the references in the second one you find this is from Problem 10578 in The American Mathematical Monthly Vol. 104, No. 3 (Mar., 1997), page 270, see jstor.org/stable/….
    $endgroup$
    – Sil
    yesterday
















31












$begingroup$


My son gave me the following recurrence formula for $x_n$ ($nge2$):




$$(n+1)(n-2)x_n+1=n(n^2-n-1)x_n-(n-1)^3x_n-1tag1$$
$$x_2=x_3=1$$




The task I got from him:



  • The sequence has an interesting property, find it out.

  • Make a conjecture and prove it.

Obviously I had to start with a few values and calculating them by hand turned out to be difficult. So I used Mathematica and defined the sequence as follows:



b[n_] := b[n] = n (n^2 - n - 1) a[n] - (n - 1)^3 a[n - 1];
a[n_] := a[n] = b[n - 1]/(n (n - 3));
a[2] = 1;
a[3] = 1;


And I got the following results:



$$ a_4=frac74, a_5=5, a_6=frac1216, a_7=103, a_8=frac50418, a_9=frac403219, \ a_10=frac36288110, a_11=329891, a_12=frac3991680112, a_13=36846277, a_14=frac622702080114dots$$



Numbers don't make any sense but it's strange that the sequence produces integer values from time to time. It's not something that I expected from a pretty complex definition like (1).



So I decided to find the values of $n$ producing integer values of $a_n$. I did an experiment for $2le n le 100$:



table = Table[i, a[i], i, 2, 100];
integers = Select[table, (IntegerQ[#[[2]]]) &];
itegerIndexes = Map[#[[1]] &, integers]


...and the output was:



2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 
59, 61, 67, 71, 73, 79, 83, 89, 97


Conjecture (pretty amazing, at least to me):




$a_n$ is an integer if and only if $n$ is prime.




Interesting primality test, isn't it? The trick is to prove that it's correct. I have started with the substitution:



$$y_n=n x_n$$



...which simplifies (1) a bit:



$$(n-2)y_n+1=(n^2-n-1)y_n-(n-1)^2y_n-1$$



...but I did not get much further (the next step, I guess, should be rearrangement).










share|cite|improve this question











$endgroup$







  • 2




    $begingroup$
    The fact that this sequence starts with the first prime index looks like a huge hint, seeing as mathematicians would start with n= 1 and software devs with n = 0 :-)
    $endgroup$
    – Carl Witthoft
    2 days ago






  • 2




    $begingroup$
    If you're interested in returning the favor to your son, there are Diophantine Equations which enumerate all primes. The result is an inequality such that, if this polynomial function (whose inputs are 26 whole numbers labeled a through z) is greater than zero, then k, the 11th argument to the function, is prime, and every prime on the entire numberline is enumerated this way.
    $endgroup$
    – Cort Ammon
    2 days ago







  • 2




    $begingroup$
    Looking at OEIS reveals origins of this problem, numerators are oeis.org/A005450, denominators are oeis.org/A005451, and in the references in the second one you find this is from Problem 10578 in The American Mathematical Monthly Vol. 104, No. 3 (Mar., 1997), page 270, see jstor.org/stable/….
    $endgroup$
    – Sil
    yesterday














31












31








31


6



$begingroup$


My son gave me the following recurrence formula for $x_n$ ($nge2$):




$$(n+1)(n-2)x_n+1=n(n^2-n-1)x_n-(n-1)^3x_n-1tag1$$
$$x_2=x_3=1$$




The task I got from him:



  • The sequence has an interesting property, find it out.

  • Make a conjecture and prove it.

Obviously I had to start with a few values and calculating them by hand turned out to be difficult. So I used Mathematica and defined the sequence as follows:



b[n_] := b[n] = n (n^2 - n - 1) a[n] - (n - 1)^3 a[n - 1];
a[n_] := a[n] = b[n - 1]/(n (n - 3));
a[2] = 1;
a[3] = 1;


And I got the following results:



$$ a_4=frac74, a_5=5, a_6=frac1216, a_7=103, a_8=frac50418, a_9=frac403219, \ a_10=frac36288110, a_11=329891, a_12=frac3991680112, a_13=36846277, a_14=frac622702080114dots$$



Numbers don't make any sense but it's strange that the sequence produces integer values from time to time. It's not something that I expected from a pretty complex definition like (1).



So I decided to find the values of $n$ producing integer values of $a_n$. I did an experiment for $2le n le 100$:



table = Table[i, a[i], i, 2, 100];
integers = Select[table, (IntegerQ[#[[2]]]) &];
itegerIndexes = Map[#[[1]] &, integers]


...and the output was:



2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 
59, 61, 67, 71, 73, 79, 83, 89, 97


Conjecture (pretty amazing, at least to me):




$a_n$ is an integer if and only if $n$ is prime.




Interesting primality test, isn't it? The trick is to prove that it's correct. I have started with the substitution:



$$y_n=n x_n$$



...which simplifies (1) a bit:



$$(n-2)y_n+1=(n^2-n-1)y_n-(n-1)^2y_n-1$$



...but I did not get much further (the next step, I guess, should be rearrangement).










share|cite|improve this question











$endgroup$




My son gave me the following recurrence formula for $x_n$ ($nge2$):




$$(n+1)(n-2)x_n+1=n(n^2-n-1)x_n-(n-1)^3x_n-1tag1$$
$$x_2=x_3=1$$




The task I got from him:



  • The sequence has an interesting property, find it out.

  • Make a conjecture and prove it.

Obviously I had to start with a few values and calculating them by hand turned out to be difficult. So I used Mathematica and defined the sequence as follows:



b[n_] := b[n] = n (n^2 - n - 1) a[n] - (n - 1)^3 a[n - 1];
a[n_] := a[n] = b[n - 1]/(n (n - 3));
a[2] = 1;
a[3] = 1;


And I got the following results:



$$ a_4=frac74, a_5=5, a_6=frac1216, a_7=103, a_8=frac50418, a_9=frac403219, \ a_10=frac36288110, a_11=329891, a_12=frac3991680112, a_13=36846277, a_14=frac622702080114dots$$



Numbers don't make any sense but it's strange that the sequence produces integer values from time to time. It's not something that I expected from a pretty complex definition like (1).



So I decided to find the values of $n$ producing integer values of $a_n$. I did an experiment for $2le n le 100$:



table = Table[i, a[i], i, 2, 100];
integers = Select[table, (IntegerQ[#[[2]]]) &];
itegerIndexes = Map[#[[1]] &, integers]


...and the output was:



2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 
59, 61, 67, 71, 73, 79, 83, 89, 97


Conjecture (pretty amazing, at least to me):




$a_n$ is an integer if and only if $n$ is prime.




Interesting primality test, isn't it? The trick is to prove that it's correct. I have started with the substitution:



$$y_n=n x_n$$



...which simplifies (1) a bit:



$$(n-2)y_n+1=(n^2-n-1)y_n-(n-1)^2y_n-1$$



...but I did not get much further (the next step, I guess, should be rearrangement).







sequences-and-series elementary-number-theory prime-numbers recurrence-relations primality-test






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited yesterday









Song

18.2k21449




18.2k21449










asked 2 days ago









OldboyOldboy

8,84611138




8,84611138







  • 2




    $begingroup$
    The fact that this sequence starts with the first prime index looks like a huge hint, seeing as mathematicians would start with n= 1 and software devs with n = 0 :-)
    $endgroup$
    – Carl Witthoft
    2 days ago






  • 2




    $begingroup$
    If you're interested in returning the favor to your son, there are Diophantine Equations which enumerate all primes. The result is an inequality such that, if this polynomial function (whose inputs are 26 whole numbers labeled a through z) is greater than zero, then k, the 11th argument to the function, is prime, and every prime on the entire numberline is enumerated this way.
    $endgroup$
    – Cort Ammon
    2 days ago







  • 2




    $begingroup$
    Looking at OEIS reveals origins of this problem, numerators are oeis.org/A005450, denominators are oeis.org/A005451, and in the references in the second one you find this is from Problem 10578 in The American Mathematical Monthly Vol. 104, No. 3 (Mar., 1997), page 270, see jstor.org/stable/….
    $endgroup$
    – Sil
    yesterday













  • 2




    $begingroup$
    The fact that this sequence starts with the first prime index looks like a huge hint, seeing as mathematicians would start with n= 1 and software devs with n = 0 :-)
    $endgroup$
    – Carl Witthoft
    2 days ago






  • 2




    $begingroup$
    If you're interested in returning the favor to your son, there are Diophantine Equations which enumerate all primes. The result is an inequality such that, if this polynomial function (whose inputs are 26 whole numbers labeled a through z) is greater than zero, then k, the 11th argument to the function, is prime, and every prime on the entire numberline is enumerated this way.
    $endgroup$
    – Cort Ammon
    2 days ago







  • 2




    $begingroup$
    Looking at OEIS reveals origins of this problem, numerators are oeis.org/A005450, denominators are oeis.org/A005451, and in the references in the second one you find this is from Problem 10578 in The American Mathematical Monthly Vol. 104, No. 3 (Mar., 1997), page 270, see jstor.org/stable/….
    $endgroup$
    – Sil
    yesterday








2




2




$begingroup$
The fact that this sequence starts with the first prime index looks like a huge hint, seeing as mathematicians would start with n= 1 and software devs with n = 0 :-)
$endgroup$
– Carl Witthoft
2 days ago




$begingroup$
The fact that this sequence starts with the first prime index looks like a huge hint, seeing as mathematicians would start with n= 1 and software devs with n = 0 :-)
$endgroup$
– Carl Witthoft
2 days ago




2




2




$begingroup$
If you're interested in returning the favor to your son, there are Diophantine Equations which enumerate all primes. The result is an inequality such that, if this polynomial function (whose inputs are 26 whole numbers labeled a through z) is greater than zero, then k, the 11th argument to the function, is prime, and every prime on the entire numberline is enumerated this way.
$endgroup$
– Cort Ammon
2 days ago





$begingroup$
If you're interested in returning the favor to your son, there are Diophantine Equations which enumerate all primes. The result is an inequality such that, if this polynomial function (whose inputs are 26 whole numbers labeled a through z) is greater than zero, then k, the 11th argument to the function, is prime, and every prime on the entire numberline is enumerated this way.
$endgroup$
– Cort Ammon
2 days ago





2




2




$begingroup$
Looking at OEIS reveals origins of this problem, numerators are oeis.org/A005450, denominators are oeis.org/A005451, and in the references in the second one you find this is from Problem 10578 in The American Mathematical Monthly Vol. 104, No. 3 (Mar., 1997), page 270, see jstor.org/stable/….
$endgroup$
– Sil
yesterday





$begingroup$
Looking at OEIS reveals origins of this problem, numerators are oeis.org/A005450, denominators are oeis.org/A005451, and in the references in the second one you find this is from Problem 10578 in The American Mathematical Monthly Vol. 104, No. 3 (Mar., 1997), page 270, see jstor.org/stable/….
$endgroup$
– Sil
yesterday











3 Answers
3






active

oldest

votes


















38












$begingroup$

The given difference equation can be solved in the following way. We have for $nge 3$,
$$
(n-2)(y_n+1-y_n) = (n-1)^2(y_n-y_n-1),\
fracy_n+1-y_nn-1=(n-1)fracy_n-y_n-1n-2.
$$
If we let $displaystyle z_n=fracy_n-y_n-1n-2$, it follows that
$$
z_n+1=(n-1)z_n=(n-1)(n-2)z_n-1=cdots =(n-1)!z_3=(n-1)!frac3x_3-2x_21=(n-1)!
$$
This gives
$$
y_n+1-y_n=(n-1)(n-1)!=n!-(n-1)!,
$$
hence $y_n = nx_n = (n-1)!+c$ for some $c$. Plugging $n=2$ yields $2=1!+c$, thus we have that $$displaystyle x_n =frac(n-1)!+1n.$$






share|cite|improve this answer









$endgroup$




















    31












    $begingroup$

    The $n^rmth$ term of the sequence is $dfrac(n-1)! + 1n$, which is an integer if and only if $n$ is prime (according to Wilson's Theorem).






    share|cite|improve this answer









    $endgroup$








    • 2




      $begingroup$
      Yes, but it is not obvious. Can you prove it?
      $endgroup$
      – Oldboy
      2 days ago






    • 2




      $begingroup$
      I can and I did. The algebra is tedious but not difficult.
      $endgroup$
      – FredH
      2 days ago






    • 1




      $begingroup$
      I have upvoted your answer but I accepted the one with the whole solution. :)
      $endgroup$
      – Oldboy
      2 days ago


















    12












    $begingroup$

    Too long for a comment:




    Numbers don't make any sense




    Actually, they do ! :-) Just take a closer look at the sequence's composite-index denominators, and notice the following:




    $$
    a_colorblue4=frac7colorblue4,quad
    a_5=5,quad
    a_colorblue6=frac121colorblue6,quad
    a_7=103,quad
    a_colorblue8=frac5041colorblue8,quad
    a_colorblue9=frac40321colorblue9,quad
    \~\~\
    a_colorblue10=frac362881colorblue10,
    a_11=329891,quad
    a_colorblue12=frac39916801colorblue12,quad
    a_13=36846277,quaddots
    $$




    Let us now rewrite the sequence's prime-indexed elements in a similar manner, for a more uniform approach:




    $$
    a_colorblue4=frac7colorblue4,quad
    a_colorblue5=frac25colorblue5,quad
    a_colorblue6=frac121colorblue6,quad
    a_colorblue7=frac721colorblue7,quad
    a_colorblue8=frac5041colorblue8,quad
    a_colorblue9=frac40321colorblue9,quad
    \~\~\
    a_colorblue10=frac362881colorblue10,
    a_colorblue11=frac3628801colorblue11,quad
    a_colorblue12=frac39916801colorblue12,quad
    a_colorblue13=frac479001601colorblue13,quaddots
    $$




    At this point, we might be able to cheat, and use OEIS to identify the afferent sequence $colorblueb_n=ncdot a_n$ by its first few elements, yielding three possible suspects: but let's say that our mathematical virtue and intellectual integrity will prevail over our base urges of rampant curiosity, and we might resist the temptation to do so. Could we then, without any outside aide, still manage to deduce an expression for $b_n$ ? Indeed, even a superficial glance will undoubtedly reveal the growth to resemble what one might otherwise expect to see in a geometric progression, rather than an arithmetic one. We then have:




    $$
    r_colorblue4=frac257simeqcolorblue4,quad
    r_colorblue5=frac12125simeqcolorblue5,quad
    r_colorblue6=frac721121simeqcolorblue6,quad
    r_colorblue7=frac5041721simeqcolorblue7,quaddots
    $$




    In short, $colorbluer_n=dfracb_n+1b_nsimeq n.~$ A type of “modified geometric progression”, as it were, with a variable ratio equal to the index itself: Does this sound in any way familiar ? If no, there is still no need to worry: We'll get to the bottom of it soon enough, anyway. More precisely, we have $colorblueb_n+1=ncdot b_n-(n-1).~$ Now we are left with showing that, for prime values of the index p, $~colorbluea_p=dfracb_ppinmathbb N,~$ starting from $colorblueb_2=2.~$ Could mathematical induction work in this case, or does the seemingly random distribution of primes throw a wrench into such an approach ? And, if so, could we then maybe slightly modify it, to fit the new conditions ? What would you say ? :-)






    share|cite|improve this answer









    $endgroup$












    • $begingroup$
      I'm confused. What does this add to the existing answers which already give the explicit formula $x_n=((n-1)!+1)/n$?
      $endgroup$
      – YiFan
      yesterday






    • 3




      $begingroup$
      @YiFan: Clarity, perhaps ? Maybe a bit of intuition ?
      $endgroup$
      – Lucian
      yesterday











    • $begingroup$
      +1. These types of answers are by far the most helpful IMO. They encourage discovery and intuitive thinking rather than just giving the answer.
      $endgroup$
      – TreFox
      yesterday










    Your Answer





    StackExchange.ifUsing("editor", function ()
    return StackExchange.using("mathjaxEditing", function ()
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    );
    );
    , "mathjax-editing");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "69"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3149428%2fdoes-n1n-2x-n1-nn2-n-1x-n-n-13x-n-1-with-x-2-x-3-1-define-a%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    38












    $begingroup$

    The given difference equation can be solved in the following way. We have for $nge 3$,
    $$
    (n-2)(y_n+1-y_n) = (n-1)^2(y_n-y_n-1),\
    fracy_n+1-y_nn-1=(n-1)fracy_n-y_n-1n-2.
    $$
    If we let $displaystyle z_n=fracy_n-y_n-1n-2$, it follows that
    $$
    z_n+1=(n-1)z_n=(n-1)(n-2)z_n-1=cdots =(n-1)!z_3=(n-1)!frac3x_3-2x_21=(n-1)!
    $$
    This gives
    $$
    y_n+1-y_n=(n-1)(n-1)!=n!-(n-1)!,
    $$
    hence $y_n = nx_n = (n-1)!+c$ for some $c$. Plugging $n=2$ yields $2=1!+c$, thus we have that $$displaystyle x_n =frac(n-1)!+1n.$$






    share|cite|improve this answer









    $endgroup$

















      38












      $begingroup$

      The given difference equation can be solved in the following way. We have for $nge 3$,
      $$
      (n-2)(y_n+1-y_n) = (n-1)^2(y_n-y_n-1),\
      fracy_n+1-y_nn-1=(n-1)fracy_n-y_n-1n-2.
      $$
      If we let $displaystyle z_n=fracy_n-y_n-1n-2$, it follows that
      $$
      z_n+1=(n-1)z_n=(n-1)(n-2)z_n-1=cdots =(n-1)!z_3=(n-1)!frac3x_3-2x_21=(n-1)!
      $$
      This gives
      $$
      y_n+1-y_n=(n-1)(n-1)!=n!-(n-1)!,
      $$
      hence $y_n = nx_n = (n-1)!+c$ for some $c$. Plugging $n=2$ yields $2=1!+c$, thus we have that $$displaystyle x_n =frac(n-1)!+1n.$$






      share|cite|improve this answer









      $endgroup$















        38












        38








        38





        $begingroup$

        The given difference equation can be solved in the following way. We have for $nge 3$,
        $$
        (n-2)(y_n+1-y_n) = (n-1)^2(y_n-y_n-1),\
        fracy_n+1-y_nn-1=(n-1)fracy_n-y_n-1n-2.
        $$
        If we let $displaystyle z_n=fracy_n-y_n-1n-2$, it follows that
        $$
        z_n+1=(n-1)z_n=(n-1)(n-2)z_n-1=cdots =(n-1)!z_3=(n-1)!frac3x_3-2x_21=(n-1)!
        $$
        This gives
        $$
        y_n+1-y_n=(n-1)(n-1)!=n!-(n-1)!,
        $$
        hence $y_n = nx_n = (n-1)!+c$ for some $c$. Plugging $n=2$ yields $2=1!+c$, thus we have that $$displaystyle x_n =frac(n-1)!+1n.$$






        share|cite|improve this answer









        $endgroup$



        The given difference equation can be solved in the following way. We have for $nge 3$,
        $$
        (n-2)(y_n+1-y_n) = (n-1)^2(y_n-y_n-1),\
        fracy_n+1-y_nn-1=(n-1)fracy_n-y_n-1n-2.
        $$
        If we let $displaystyle z_n=fracy_n-y_n-1n-2$, it follows that
        $$
        z_n+1=(n-1)z_n=(n-1)(n-2)z_n-1=cdots =(n-1)!z_3=(n-1)!frac3x_3-2x_21=(n-1)!
        $$
        This gives
        $$
        y_n+1-y_n=(n-1)(n-1)!=n!-(n-1)!,
        $$
        hence $y_n = nx_n = (n-1)!+c$ for some $c$. Plugging $n=2$ yields $2=1!+c$, thus we have that $$displaystyle x_n =frac(n-1)!+1n.$$







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered 2 days ago









        SongSong

        18.2k21449




        18.2k21449





















            31












            $begingroup$

            The $n^rmth$ term of the sequence is $dfrac(n-1)! + 1n$, which is an integer if and only if $n$ is prime (according to Wilson's Theorem).






            share|cite|improve this answer









            $endgroup$








            • 2




              $begingroup$
              Yes, but it is not obvious. Can you prove it?
              $endgroup$
              – Oldboy
              2 days ago






            • 2




              $begingroup$
              I can and I did. The algebra is tedious but not difficult.
              $endgroup$
              – FredH
              2 days ago






            • 1




              $begingroup$
              I have upvoted your answer but I accepted the one with the whole solution. :)
              $endgroup$
              – Oldboy
              2 days ago















            31












            $begingroup$

            The $n^rmth$ term of the sequence is $dfrac(n-1)! + 1n$, which is an integer if and only if $n$ is prime (according to Wilson's Theorem).






            share|cite|improve this answer









            $endgroup$








            • 2




              $begingroup$
              Yes, but it is not obvious. Can you prove it?
              $endgroup$
              – Oldboy
              2 days ago






            • 2




              $begingroup$
              I can and I did. The algebra is tedious but not difficult.
              $endgroup$
              – FredH
              2 days ago






            • 1




              $begingroup$
              I have upvoted your answer but I accepted the one with the whole solution. :)
              $endgroup$
              – Oldboy
              2 days ago













            31












            31








            31





            $begingroup$

            The $n^rmth$ term of the sequence is $dfrac(n-1)! + 1n$, which is an integer if and only if $n$ is prime (according to Wilson's Theorem).






            share|cite|improve this answer









            $endgroup$



            The $n^rmth$ term of the sequence is $dfrac(n-1)! + 1n$, which is an integer if and only if $n$ is prime (according to Wilson's Theorem).







            share|cite|improve this answer












            share|cite|improve this answer



            share|cite|improve this answer










            answered 2 days ago









            FredHFredH

            2,2931020




            2,2931020







            • 2




              $begingroup$
              Yes, but it is not obvious. Can you prove it?
              $endgroup$
              – Oldboy
              2 days ago






            • 2




              $begingroup$
              I can and I did. The algebra is tedious but not difficult.
              $endgroup$
              – FredH
              2 days ago






            • 1




              $begingroup$
              I have upvoted your answer but I accepted the one with the whole solution. :)
              $endgroup$
              – Oldboy
              2 days ago












            • 2




              $begingroup$
              Yes, but it is not obvious. Can you prove it?
              $endgroup$
              – Oldboy
              2 days ago






            • 2




              $begingroup$
              I can and I did. The algebra is tedious but not difficult.
              $endgroup$
              – FredH
              2 days ago






            • 1




              $begingroup$
              I have upvoted your answer but I accepted the one with the whole solution. :)
              $endgroup$
              – Oldboy
              2 days ago







            2




            2




            $begingroup$
            Yes, but it is not obvious. Can you prove it?
            $endgroup$
            – Oldboy
            2 days ago




            $begingroup$
            Yes, but it is not obvious. Can you prove it?
            $endgroup$
            – Oldboy
            2 days ago




            2




            2




            $begingroup$
            I can and I did. The algebra is tedious but not difficult.
            $endgroup$
            – FredH
            2 days ago




            $begingroup$
            I can and I did. The algebra is tedious but not difficult.
            $endgroup$
            – FredH
            2 days ago




            1




            1




            $begingroup$
            I have upvoted your answer but I accepted the one with the whole solution. :)
            $endgroup$
            – Oldboy
            2 days ago




            $begingroup$
            I have upvoted your answer but I accepted the one with the whole solution. :)
            $endgroup$
            – Oldboy
            2 days ago











            12












            $begingroup$

            Too long for a comment:




            Numbers don't make any sense




            Actually, they do ! :-) Just take a closer look at the sequence's composite-index denominators, and notice the following:




            $$
            a_colorblue4=frac7colorblue4,quad
            a_5=5,quad
            a_colorblue6=frac121colorblue6,quad
            a_7=103,quad
            a_colorblue8=frac5041colorblue8,quad
            a_colorblue9=frac40321colorblue9,quad
            \~\~\
            a_colorblue10=frac362881colorblue10,
            a_11=329891,quad
            a_colorblue12=frac39916801colorblue12,quad
            a_13=36846277,quaddots
            $$




            Let us now rewrite the sequence's prime-indexed elements in a similar manner, for a more uniform approach:




            $$
            a_colorblue4=frac7colorblue4,quad
            a_colorblue5=frac25colorblue5,quad
            a_colorblue6=frac121colorblue6,quad
            a_colorblue7=frac721colorblue7,quad
            a_colorblue8=frac5041colorblue8,quad
            a_colorblue9=frac40321colorblue9,quad
            \~\~\
            a_colorblue10=frac362881colorblue10,
            a_colorblue11=frac3628801colorblue11,quad
            a_colorblue12=frac39916801colorblue12,quad
            a_colorblue13=frac479001601colorblue13,quaddots
            $$




            At this point, we might be able to cheat, and use OEIS to identify the afferent sequence $colorblueb_n=ncdot a_n$ by its first few elements, yielding three possible suspects: but let's say that our mathematical virtue and intellectual integrity will prevail over our base urges of rampant curiosity, and we might resist the temptation to do so. Could we then, without any outside aide, still manage to deduce an expression for $b_n$ ? Indeed, even a superficial glance will undoubtedly reveal the growth to resemble what one might otherwise expect to see in a geometric progression, rather than an arithmetic one. We then have:




            $$
            r_colorblue4=frac257simeqcolorblue4,quad
            r_colorblue5=frac12125simeqcolorblue5,quad
            r_colorblue6=frac721121simeqcolorblue6,quad
            r_colorblue7=frac5041721simeqcolorblue7,quaddots
            $$




            In short, $colorbluer_n=dfracb_n+1b_nsimeq n.~$ A type of “modified geometric progression”, as it were, with a variable ratio equal to the index itself: Does this sound in any way familiar ? If no, there is still no need to worry: We'll get to the bottom of it soon enough, anyway. More precisely, we have $colorblueb_n+1=ncdot b_n-(n-1).~$ Now we are left with showing that, for prime values of the index p, $~colorbluea_p=dfracb_ppinmathbb N,~$ starting from $colorblueb_2=2.~$ Could mathematical induction work in this case, or does the seemingly random distribution of primes throw a wrench into such an approach ? And, if so, could we then maybe slightly modify it, to fit the new conditions ? What would you say ? :-)






            share|cite|improve this answer









            $endgroup$












            • $begingroup$
              I'm confused. What does this add to the existing answers which already give the explicit formula $x_n=((n-1)!+1)/n$?
              $endgroup$
              – YiFan
              yesterday






            • 3




              $begingroup$
              @YiFan: Clarity, perhaps ? Maybe a bit of intuition ?
              $endgroup$
              – Lucian
              yesterday











            • $begingroup$
              +1. These types of answers are by far the most helpful IMO. They encourage discovery and intuitive thinking rather than just giving the answer.
              $endgroup$
              – TreFox
              yesterday















            12












            $begingroup$

            Too long for a comment:




            Numbers don't make any sense




            Actually, they do ! :-) Just take a closer look at the sequence's composite-index denominators, and notice the following:




            $$
            a_colorblue4=frac7colorblue4,quad
            a_5=5,quad
            a_colorblue6=frac121colorblue6,quad
            a_7=103,quad
            a_colorblue8=frac5041colorblue8,quad
            a_colorblue9=frac40321colorblue9,quad
            \~\~\
            a_colorblue10=frac362881colorblue10,
            a_11=329891,quad
            a_colorblue12=frac39916801colorblue12,quad
            a_13=36846277,quaddots
            $$




            Let us now rewrite the sequence's prime-indexed elements in a similar manner, for a more uniform approach:




            $$
            a_colorblue4=frac7colorblue4,quad
            a_colorblue5=frac25colorblue5,quad
            a_colorblue6=frac121colorblue6,quad
            a_colorblue7=frac721colorblue7,quad
            a_colorblue8=frac5041colorblue8,quad
            a_colorblue9=frac40321colorblue9,quad
            \~\~\
            a_colorblue10=frac362881colorblue10,
            a_colorblue11=frac3628801colorblue11,quad
            a_colorblue12=frac39916801colorblue12,quad
            a_colorblue13=frac479001601colorblue13,quaddots
            $$




            At this point, we might be able to cheat, and use OEIS to identify the afferent sequence $colorblueb_n=ncdot a_n$ by its first few elements, yielding three possible suspects: but let's say that our mathematical virtue and intellectual integrity will prevail over our base urges of rampant curiosity, and we might resist the temptation to do so. Could we then, without any outside aide, still manage to deduce an expression for $b_n$ ? Indeed, even a superficial glance will undoubtedly reveal the growth to resemble what one might otherwise expect to see in a geometric progression, rather than an arithmetic one. We then have:




            $$
            r_colorblue4=frac257simeqcolorblue4,quad
            r_colorblue5=frac12125simeqcolorblue5,quad
            r_colorblue6=frac721121simeqcolorblue6,quad
            r_colorblue7=frac5041721simeqcolorblue7,quaddots
            $$




            In short, $colorbluer_n=dfracb_n+1b_nsimeq n.~$ A type of “modified geometric progression”, as it were, with a variable ratio equal to the index itself: Does this sound in any way familiar ? If no, there is still no need to worry: We'll get to the bottom of it soon enough, anyway. More precisely, we have $colorblueb_n+1=ncdot b_n-(n-1).~$ Now we are left with showing that, for prime values of the index p, $~colorbluea_p=dfracb_ppinmathbb N,~$ starting from $colorblueb_2=2.~$ Could mathematical induction work in this case, or does the seemingly random distribution of primes throw a wrench into such an approach ? And, if so, could we then maybe slightly modify it, to fit the new conditions ? What would you say ? :-)






            share|cite|improve this answer









            $endgroup$












            • $begingroup$
              I'm confused. What does this add to the existing answers which already give the explicit formula $x_n=((n-1)!+1)/n$?
              $endgroup$
              – YiFan
              yesterday






            • 3




              $begingroup$
              @YiFan: Clarity, perhaps ? Maybe a bit of intuition ?
              $endgroup$
              – Lucian
              yesterday











            • $begingroup$
              +1. These types of answers are by far the most helpful IMO. They encourage discovery and intuitive thinking rather than just giving the answer.
              $endgroup$
              – TreFox
              yesterday













            12












            12








            12





            $begingroup$

            Too long for a comment:




            Numbers don't make any sense




            Actually, they do ! :-) Just take a closer look at the sequence's composite-index denominators, and notice the following:




            $$
            a_colorblue4=frac7colorblue4,quad
            a_5=5,quad
            a_colorblue6=frac121colorblue6,quad
            a_7=103,quad
            a_colorblue8=frac5041colorblue8,quad
            a_colorblue9=frac40321colorblue9,quad
            \~\~\
            a_colorblue10=frac362881colorblue10,
            a_11=329891,quad
            a_colorblue12=frac39916801colorblue12,quad
            a_13=36846277,quaddots
            $$




            Let us now rewrite the sequence's prime-indexed elements in a similar manner, for a more uniform approach:




            $$
            a_colorblue4=frac7colorblue4,quad
            a_colorblue5=frac25colorblue5,quad
            a_colorblue6=frac121colorblue6,quad
            a_colorblue7=frac721colorblue7,quad
            a_colorblue8=frac5041colorblue8,quad
            a_colorblue9=frac40321colorblue9,quad
            \~\~\
            a_colorblue10=frac362881colorblue10,
            a_colorblue11=frac3628801colorblue11,quad
            a_colorblue12=frac39916801colorblue12,quad
            a_colorblue13=frac479001601colorblue13,quaddots
            $$




            At this point, we might be able to cheat, and use OEIS to identify the afferent sequence $colorblueb_n=ncdot a_n$ by its first few elements, yielding three possible suspects: but let's say that our mathematical virtue and intellectual integrity will prevail over our base urges of rampant curiosity, and we might resist the temptation to do so. Could we then, without any outside aide, still manage to deduce an expression for $b_n$ ? Indeed, even a superficial glance will undoubtedly reveal the growth to resemble what one might otherwise expect to see in a geometric progression, rather than an arithmetic one. We then have:




            $$
            r_colorblue4=frac257simeqcolorblue4,quad
            r_colorblue5=frac12125simeqcolorblue5,quad
            r_colorblue6=frac721121simeqcolorblue6,quad
            r_colorblue7=frac5041721simeqcolorblue7,quaddots
            $$




            In short, $colorbluer_n=dfracb_n+1b_nsimeq n.~$ A type of “modified geometric progression”, as it were, with a variable ratio equal to the index itself: Does this sound in any way familiar ? If no, there is still no need to worry: We'll get to the bottom of it soon enough, anyway. More precisely, we have $colorblueb_n+1=ncdot b_n-(n-1).~$ Now we are left with showing that, for prime values of the index p, $~colorbluea_p=dfracb_ppinmathbb N,~$ starting from $colorblueb_2=2.~$ Could mathematical induction work in this case, or does the seemingly random distribution of primes throw a wrench into such an approach ? And, if so, could we then maybe slightly modify it, to fit the new conditions ? What would you say ? :-)






            share|cite|improve this answer









            $endgroup$



            Too long for a comment:




            Numbers don't make any sense




            Actually, they do ! :-) Just take a closer look at the sequence's composite-index denominators, and notice the following:




            $$
            a_colorblue4=frac7colorblue4,quad
            a_5=5,quad
            a_colorblue6=frac121colorblue6,quad
            a_7=103,quad
            a_colorblue8=frac5041colorblue8,quad
            a_colorblue9=frac40321colorblue9,quad
            \~\~\
            a_colorblue10=frac362881colorblue10,
            a_11=329891,quad
            a_colorblue12=frac39916801colorblue12,quad
            a_13=36846277,quaddots
            $$




            Let us now rewrite the sequence's prime-indexed elements in a similar manner, for a more uniform approach:




            $$
            a_colorblue4=frac7colorblue4,quad
            a_colorblue5=frac25colorblue5,quad
            a_colorblue6=frac121colorblue6,quad
            a_colorblue7=frac721colorblue7,quad
            a_colorblue8=frac5041colorblue8,quad
            a_colorblue9=frac40321colorblue9,quad
            \~\~\
            a_colorblue10=frac362881colorblue10,
            a_colorblue11=frac3628801colorblue11,quad
            a_colorblue12=frac39916801colorblue12,quad
            a_colorblue13=frac479001601colorblue13,quaddots
            $$




            At this point, we might be able to cheat, and use OEIS to identify the afferent sequence $colorblueb_n=ncdot a_n$ by its first few elements, yielding three possible suspects: but let's say that our mathematical virtue and intellectual integrity will prevail over our base urges of rampant curiosity, and we might resist the temptation to do so. Could we then, without any outside aide, still manage to deduce an expression for $b_n$ ? Indeed, even a superficial glance will undoubtedly reveal the growth to resemble what one might otherwise expect to see in a geometric progression, rather than an arithmetic one. We then have:




            $$
            r_colorblue4=frac257simeqcolorblue4,quad
            r_colorblue5=frac12125simeqcolorblue5,quad
            r_colorblue6=frac721121simeqcolorblue6,quad
            r_colorblue7=frac5041721simeqcolorblue7,quaddots
            $$




            In short, $colorbluer_n=dfracb_n+1b_nsimeq n.~$ A type of “modified geometric progression”, as it were, with a variable ratio equal to the index itself: Does this sound in any way familiar ? If no, there is still no need to worry: We'll get to the bottom of it soon enough, anyway. More precisely, we have $colorblueb_n+1=ncdot b_n-(n-1).~$ Now we are left with showing that, for prime values of the index p, $~colorbluea_p=dfracb_ppinmathbb N,~$ starting from $colorblueb_2=2.~$ Could mathematical induction work in this case, or does the seemingly random distribution of primes throw a wrench into such an approach ? And, if so, could we then maybe slightly modify it, to fit the new conditions ? What would you say ? :-)







            share|cite|improve this answer












            share|cite|improve this answer



            share|cite|improve this answer










            answered yesterday









            LucianLucian

            41.4k159131




            41.4k159131











            • $begingroup$
              I'm confused. What does this add to the existing answers which already give the explicit formula $x_n=((n-1)!+1)/n$?
              $endgroup$
              – YiFan
              yesterday






            • 3




              $begingroup$
              @YiFan: Clarity, perhaps ? Maybe a bit of intuition ?
              $endgroup$
              – Lucian
              yesterday











            • $begingroup$
              +1. These types of answers are by far the most helpful IMO. They encourage discovery and intuitive thinking rather than just giving the answer.
              $endgroup$
              – TreFox
              yesterday
















            • $begingroup$
              I'm confused. What does this add to the existing answers which already give the explicit formula $x_n=((n-1)!+1)/n$?
              $endgroup$
              – YiFan
              yesterday






            • 3




              $begingroup$
              @YiFan: Clarity, perhaps ? Maybe a bit of intuition ?
              $endgroup$
              – Lucian
              yesterday











            • $begingroup$
              +1. These types of answers are by far the most helpful IMO. They encourage discovery and intuitive thinking rather than just giving the answer.
              $endgroup$
              – TreFox
              yesterday















            $begingroup$
            I'm confused. What does this add to the existing answers which already give the explicit formula $x_n=((n-1)!+1)/n$?
            $endgroup$
            – YiFan
            yesterday




            $begingroup$
            I'm confused. What does this add to the existing answers which already give the explicit formula $x_n=((n-1)!+1)/n$?
            $endgroup$
            – YiFan
            yesterday




            3




            3




            $begingroup$
            @YiFan: Clarity, perhaps ? Maybe a bit of intuition ?
            $endgroup$
            – Lucian
            yesterday





            $begingroup$
            @YiFan: Clarity, perhaps ? Maybe a bit of intuition ?
            $endgroup$
            – Lucian
            yesterday













            $begingroup$
            +1. These types of answers are by far the most helpful IMO. They encourage discovery and intuitive thinking rather than just giving the answer.
            $endgroup$
            – TreFox
            yesterday




            $begingroup$
            +1. These types of answers are by far the most helpful IMO. They encourage discovery and intuitive thinking rather than just giving the answer.
            $endgroup$
            – TreFox
            yesterday

















            draft saved

            draft discarded
















































            Thanks for contributing an answer to Mathematics Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3149428%2fdoes-n1n-2x-n1-nn2-n-1x-n-n-13x-n-1-with-x-2-x-3-1-define-a%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Is flight data recorder erased after every flight?When are black boxes used?What protects the location beacon (pinger) of a flight data recorder?Is there anywhere I can pick up raw flight data recorder information?Who legally owns the Flight Data Recorder?Constructing flight recorder dataWhy are FDRs and CVRs still two separate physical devices?What are the data elements shown on the GE235 flight data recorder (FDR) plot?Are CVR and FDR reset after every flight?What is the format of data stored by a Flight Data Recorder?How much data is stored in the flight data recorder per hour in a typical flight of an A380?Is a smart flight data recorder possible?

            Which is better: GPT or RelGAN for text generation?2019 Community Moderator ElectionWhat is the difference between TextGAN and LM for text generation?GANs (generative adversarial networks) possible for text as well?Generator loss not decreasing- text to image synthesisChoosing a right algorithm for template-based text generationHow should I format input and output for text generation with LSTMsGumbel Softmax vs Vanilla Softmax for GAN trainingWhich neural network to choose for classification from text/speech?NLP text autoencoder that generates text in poetic meterWhat is the interpretation of the expectation notation in the GAN formulation?What is the difference between TextGAN and LM for text generation?How to prepare the data for text generation task

            Is there a general name for the setup in which payoffs are not known exactly but players try to influence each other's perception of the payoffs?Osborne, Nash equilibria and the correctness of beliefsIs there a name for this family of games (Binomial games?)?Perfect Bayesian EquilibriumCalculating mixed strategy equilibrium in battle of sexesPure Strategy SPNEIs there a commitment mechanism which allows players to achieve pareto optimal solutions?Extensive Form GamesAn $n$-player prisoner's dilemma where a coalition of 2 players is better off defectingTit-For-Stat Strategy Best RepliesPotential solutions of the $n$-player Prisoner's Dilemma