4
$\begingroup$

Calculate an n-order determinant:

$\left|\begin{array}{cccccc}1 & 2 & 3 & \cdots & n-1 & n \\ n & 1 & 2 & \cdots & n-2 & n-1 \\ n-1 & n & 1 & \cdots & n-3 & n-2 \\ \vdots & \vdots & \vdots & & \vdots & \vdots \\ 2 & 3 & 4 & \cdots & n & 1\end{array}\right|$

The result should be:

$(-1)^{n-1} \frac{n+1}{2} n^{n-1}$

But I can't get this result by FindSequenceFunction:

Clear["Global`*"];
a[n_Integer?Positive] := Array[Mod[#2 - #1, n] + 1 &, {n, n}]
detmm[n_] := Det[a[n]]
tab = Table[detmm[k], {k, 1, 20}];
FindSequenceFunction[tab, n]

FindSequenceFunction[{1, -3, 18, -160, 1875, -27216, 470596, -9437184, 215233605, -5500000000, 155624547606, -4829554409472, 163086595857367, -5952860799406080, 233543408203125000, -9799832789158199296, 437950726881001816329, -20766159817517617053696, 1041273502979112415328410, -55050240000000000000000000}, n]

Is this due to the limitations of FindSequenceFunction or some problems in my method? Is there any other way?

$\endgroup$
8
  • 4
    $\begingroup$ This is it, right? $\endgroup$
    – bmf
    Apr 20 at 3:19
  • 1
    $\begingroup$ I didn't know something like this existed. Thanks for that info, @bmf. $\endgroup$ Apr 20 at 3:28
  • 1
    $\begingroup$ @E.Chan-López you're welcome. It's useful as a resource. I have found examples where FindSequenceFunction fails, but there's a known sequence. This example seems to fall in this category $\endgroup$
    – bmf
    Apr 20 at 3:31
  • $\begingroup$ @bmf Thanks for sharing! This website has the same function as FindSequenceFunction. It's great! $\endgroup$
    – lotus2019
    Apr 20 at 7:13
  • $\begingroup$ @lotus2019 you are very welcome. Actually, OEIS is a database and people can submit known sequences. You can also find Mathematica implementation for those sequences. You might want to send an email to the support team of Mathematica with this case. It's been a while since they updated FindSequenceFunction and might be helpful for them to have a library of sequences that could be included. $\endgroup$
    – bmf
    Apr 20 at 12:51

0

Your Answer

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

Browse other questions tagged or ask your own question.