A sequence that has integer values for prime indexes only:Generalized Fibonacci Sequence QuestionSomos 3 sequences explanationProving a Pellian connection in the divisibility condition $(a^2+b^2+1) mid 2(2ab+1)$Limit of a sequence of averages (three variables)Does the A001921 linear recurrent integer sequence always yield composite numbers?A man died. Let's divide the estate!!! How?If $x_n_n=1^infty$ is a basis for $X$ is $x_1cupx_n-x_n-1_n=2^infty$ also a basis for $X$?Is $tau(2^n-1)$ always divides $phi(2^n-1)$ for every integer $n geq 1$?How to evaluate series based on recurrence equationConstruct $(y_n)$ such that $x_n leq y_n leq 2y_f(n)$ where $f:mathbbN_geq 0 to mathbbN_geq 1$ is strictly increasing

Why one should not leave fingerprints on bulbs and plugs?

The difference between「N分で」and「後N分で」

If curse and magic is two sides of the same coin, why the former is forbidden?

Have researchers managed to "reverse time"? If so, what does that mean for physics?

It's a yearly task, alright

Is it possible to upcast ritual spells?

Why would a flight no longer considered airworthy be redirected like this?

Why do Australian milk farmers need to protest supermarkets' milk price?

Min function accepting varying number of arguments in C++17

compactness of a set where am I going wrong

Who is flying the vertibirds?

Recruiter wants very extensive technical details about all of my previous work

PTIJ: Who should I vote for? (21st Knesset Edition)

Happy pi day, everyone!

Look at your watch and tell me what time is it. vs Look at your watch and tell me what time it is

Existence of subset with given Hausdorff dimension

Co-worker team leader wants to inject his friend's awful software into our development. What should I say to our common boss?

Are ETF trackers fundamentally better than individual stocks?

Sailing the cryptic seas

Did Ender ever learn that he killed Stilson and/or Bonzo?

Is it normal that my co-workers at a fitness company criticize my food choices?

Is it true that good novels will automatically sell themselves on Amazon (and so on) and there is no need for one to waste time promoting?

Do the common programs (for example: "ls", "cat") in Linux and BSD come from the same source code?

Why Choose Less Effective Armour Types?



A sequence that has integer values for prime indexes only:


Generalized Fibonacci Sequence QuestionSomos 3 sequences explanationProving a Pellian connection in the divisibility condition $(a^2+b^2+1) mid 2(2ab+1)$Limit of a sequence of averages (three variables)Does the A001921 linear recurrent integer sequence always yield composite numbers?A man died. Let's divide the estate!!! How?If $x_n_n=1^infty$ is a basis for $X$ is $x_1cupx_n-x_n-1_n=2^infty$ also a basis for $X$?Is $tau(2^n-1)$ always divides $phi(2^n-1)$ for every integer $n geq 1$?How to evaluate series based on recurrence equationConstruct $(y_n)$ such that $x_n leq y_n leq 2y_f(n)$ where $f:mathbbN_geq 0 to mathbbN_geq 1$ is strictly increasing













19












$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 integer iff $n$ is prime.




Interesting primality test, isn't it? The trick is to prove that it's correct. I have started with 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
    12 hours ago






  • 1




    $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
    12 hours ago
















19












$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 integer iff $n$ is prime.




Interesting primality test, isn't it? The trick is to prove that it's correct. I have started with 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
    12 hours ago






  • 1




    $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
    12 hours ago














19












19








19


3



$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 integer iff $n$ is prime.




Interesting primality test, isn't it? The trick is to prove that it's correct. I have started with 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 integer iff $n$ is prime.




Interesting primality test, isn't it? The trick is to prove that it's correct. I have started with 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






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked 13 hours ago









OldboyOldboy

8,77611037




8,77611037







  • 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
    12 hours ago






  • 1




    $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
    12 hours ago













  • 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
    12 hours ago






  • 1




    $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
    12 hours ago








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
12 hours 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
12 hours ago




1




1




$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
12 hours 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
12 hours ago











3 Answers
3






active

oldest

votes


















21












$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$




















    24












    $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
      12 hours ago






    • 2




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










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


















    0












    $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
      1 hour ago










    • $begingroup$
      @YiFan: Clarity, perhaps ? Maybe a bit of intuition ?
      $endgroup$
      – Lucian
      1 hour ago











    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%2fa-sequence-that-has-integer-values-for-prime-indexes-only%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









    21












    $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$

















      21












      $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$















        21












        21








        21





        $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 12 hours ago









        SongSong

        17.8k21349




        17.8k21349





















            24












            $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
              12 hours ago






            • 2




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










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















            24












            $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
              12 hours ago






            • 2




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










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













            24












            24








            24





            $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 13 hours ago









            FredHFredH

            2,044814




            2,044814







            • 2




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






            • 2




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










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












            • 2




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






            • 2




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










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







            2




            2




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




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




            2




            2




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




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












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




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











            0












            $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
              1 hour ago










            • $begingroup$
              @YiFan: Clarity, perhaps ? Maybe a bit of intuition ?
              $endgroup$
              – Lucian
              1 hour ago
















            0












            $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
              1 hour ago










            • $begingroup$
              @YiFan: Clarity, perhaps ? Maybe a bit of intuition ?
              $endgroup$
              – Lucian
              1 hour ago














            0












            0








            0





            $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 1 hour ago









            LucianLucian

            41.3k159130




            41.3k159130











            • $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
              1 hour ago










            • $begingroup$
              @YiFan: Clarity, perhaps ? Maybe a bit of intuition ?
              $endgroup$
              – Lucian
              1 hour ago

















            • $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
              1 hour ago










            • $begingroup$
              @YiFan: Clarity, perhaps ? Maybe a bit of intuition ?
              $endgroup$
              – Lucian
              1 hour ago
















            $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
            1 hour ago




            $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
            1 hour ago












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





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


















            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%2fa-sequence-that-has-integer-values-for-prime-indexes-only%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

            Masuk log Menu navigasi

            Identifying “long and narrow” polygons in with PostGISlength and width of polygonWhy postgis st_overlaps reports Qgis' “avoid intersections” generated polygon as overlapping with others?Adjusting polygons to boundary and filling holesDrawing polygons with fixed area?How to remove spikes in Polygons with PostGISDeleting sliver polygons after difference operation in QGIS?Snapping boundaries in PostGISSplit polygon into parts adding attributes based on underlying polygon in QGISSplitting overlap between polygons and assign to nearest polygon using PostGIS?Expanding polygons and clipping at midpoint?Removing Intersection of Buffers in Same Layers

            Старые Смолеговицы Содержание История | География | Демография | Достопримечательности | Примечания | НавигацияHGЯOLHGЯOL41 206 832 01641 606 406 141Административно-территориальное деление Ленинградской области«Переписная оброчная книга Водской пятины 1500 года», С. 793«Карта Ингерманландии: Ивангорода, Яма, Копорья, Нотеборга», по материалам 1676 г.«Генеральная карта провинции Ингерманландии» Э. Белинга и А. Андерсина, 1704 г., составлена по материалам 1678 г.«Географический чертёж над Ижорскою землей со своими городами» Адриана Шонбека 1705 г.Новая и достоверная всей Ингерманландии ланткарта. Грав. А. Ростовцев. СПб., 1727 г.Топографическая карта Санкт-Петербургской губернии. 5-и верстка. Шуберт. 1834 г.Описание Санкт-Петербургской губернии по уездам и станамСпецкарта западной части России Ф. Ф. Шуберта. 1844 г.Алфавитный список селений по уездам и станам С.-Петербургской губернииСписки населённых мест Российской Империи, составленные и издаваемые центральным статистическим комитетом министерства внутренних дел. XXXVII. Санкт-Петербургская губерния. По состоянию на 1862 год. СПб. 1864. С. 203Материалы по статистике народного хозяйства в С.-Петербургской губернии. Вып. IX. Частновладельческое хозяйство в Ямбургском уезде. СПб, 1888, С. 146, С. 2, 7, 54Положение о гербе муниципального образования Курское сельское поселениеСправочник истории административно-территориального деления Ленинградской области.Топографическая карта Ленинградской области, квадрат О-35-23-В (Хотыницы), 1930 г.АрхивированоАдминистративно-территориальное деление Ленинградской области. — Л., 1933, С. 27, 198АрхивированоАдминистративно-экономический справочник по Ленинградской области. — Л., 1936, с. 219АрхивированоАдминистративно-территориальное деление Ленинградской области. — Л., 1966, с. 175АрхивированоАдминистративно-территориальное деление Ленинградской области. — Лениздат, 1973, С. 180АрхивированоАдминистративно-территориальное деление Ленинградской области. — Лениздат, 1990, ISBN 5-289-00612-5, С. 38АрхивированоАдминистративно-территориальное деление Ленинградской области. — СПб., 2007, с. 60АрхивированоКоряков Юрий База данных «Этно-языковой состав населённых пунктов России». Ленинградская область.Административно-территориальное деление Ленинградской области. — СПб, 1997, ISBN 5-86153-055-6, С. 41АрхивированоКультовый комплекс Старые Смолеговицы // Электронная энциклопедия ЭрмитажаПроблемы выявления, изучения и сохранения культовых комплексов с каменными крестами: по материалам работ 2016-2017 гг. в Ленинградской области