%I #53 Sep 26 2023 09:46:47
%S 1,15,225,3781,72078,1550016,37259191,991980099,29008029501,
%T 924873082849,31944725060988,1188568865803032,47403638535874501,
%U 2017753008682107135,91309129890388047873,4377769140759352823773,221687675024545322612226
%N a(n) = n^n/E, where E is the expected number of rolls of a fair n-sided die before obtaining 3 consecutive strictly increasing rolls.
%C a(n) is the determinant of (nI-M+M^2/n-OM/n), where O is the n X n matrix of ones, M is the lower triangular of O, and I is the n X n identity matrix.
%C a(n) is asymptotically equal to n^n / L, where L = sqrt(3e) / (cos(C)*sqrt(3) - sin(C)) and C = sqrt(3)/2. L=7.9243724345... is the expected number of uniform random samples of a real number between 0 and 1 until obtaining 3 increasing values.
%C gcd(n^n,a(n)) is n^2 if n == {5, 8, 11} (mod 12), 1 if n == {0, 1} (mod 3), and 2^(k+1)n^2 otherwise, where 2^k is the highest power of 2 that divides floor(n/12).
%C The graph of n^n / a(n) against n appears to follow a shifted reciprocal.
%F a(n) = (n-1+A)/2(n-1/2+B)^(n-1) + (n-1-A)/2(n-1/2-B)^(n-1), where A=i*(n+1)/sqrt(3) and B=i*(sqrt(3)/2).
%F a(n) = f(n), where f(2) = n-1, f(3) = n*(n-2) and f(m+1) = (2n-1)*f(m)-(n^2-n+1)*f(m-1).
%t a[n_]:=Module[{O,I,M},O=ConstantArray[1,{n,n}];I=IdentityMatrix[n]; M=LowerTriangularize[O]; Det[nI-M+MatrixPower[M,2]/n-O.M/n]]; Table[a[i],{i,3,19}] (* _Robert P. P. McKone_, Aug 12 2023 *)
%t A[n_]:=I (n+1)/Sqrt[3]; B[n_]:=I Sqrt[3]/2; a[n_]:=(n-1+A[n])/2(n-1/2+B[n])^(n-1) + (n-1-A[n])/2(n-1/2-B[n])^(n-1); Simplify[Table[a[n],{n,3,19}]] (* _Stefano Spezia_, Aug 23 2023 *)
%o (Python)
%o def a(n):
%o A,B = n-1,n*(n-2)
%o for i in range(n-2):
%o A,B = B,(2*n-1)*B-(n*n-n+1)*A
%o return B
%Y Cf. A000312.
%K nonn
%O 3,2
%A _Daniel Chen_, Aug 10 2023