This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A364857 #53 Sep 26 2023 09:46:47 %S A364857 1,15,225,3781,72078,1550016,37259191,991980099,29008029501, %T A364857 924873082849,31944725060988,1188568865803032,47403638535874501, %U A364857 2017753008682107135,91309129890388047873,4377769140759352823773,221687675024545322612226 %N A364857 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 A364857 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 A364857 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 A364857 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 A364857 The graph of n^n / a(n) against n appears to follow a shifted reciprocal. %F A364857 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 A364857 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 A364857 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 A364857 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 A364857 (Python) %o A364857 def a(n): %o A364857 A,B = n-1,n*(n-2) %o A364857 for i in range(n-2): %o A364857 A,B = B,(2*n-1)*B-(n*n-n+1)*A %o A364857 return B %Y A364857 Cf. A000312. %K A364857 nonn %O A364857 3,2 %A A364857 _Daniel Chen_, Aug 10 2023