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 A362413 #46 Jul 24 2025 10:26:45 %S A362413 1,1,2,8,44,244,1744,13768,127952,1270736,14384096,172799296, %T A362413 2306400832,32442943168,498547591424,8031916728704,139611091407104, %U A362413 2533449773986048,49133884886866432,991341134236389376,21218511171980205056,471083434031674336256 %N A362413 The second moment of an n X n symmetric random +-1 matrix. %C A362413 This sequence gives the expectation of the second moment of a random symmetric sign matrix of size n X n. %D A362413 Zelin Lv, On The Moments of Random Determinants, Master Thesis, the University of Chicago. %D A362413 I. G. Zhurbenko, Moments of random determinants, Theory of Probability & Its Application, 13(4):682-686, 1968. %H A362413 Alois P. Heinz, <a href="/A362413/b362413.txt">Table of n, a(n) for n = 0..448</a> %F A362413 f^(sym)_2(n) = q(n) * (n-1)!, where %F A362413 p(n) = %F A362413 1, if n <= 2 %F A362413 2, if n >= 3 and n is odd %F A362413 3, if n >= 4 and n is even %F A362413 q(n) = p(n) + Sum_{i=1..n-1}(p(i) * q(n-i)) / (n-i). %F A362413 E.g.f.: exp(-x*(x+1))/sqrt((x+1)*(1-x)^5). - _Alois P. Heinz_, Apr 19 2023 %F A362413 a(n) ~ 4*n^(n+2)/ (3*exp(n+2)). - _Vaclav Kotesovec_, Apr 20 2023 %F A362413 a(n) = (p(n) + Sum_{i=1..n-1} p(n-i) * a(i)/i! ) * (n-1)!. - _Chai Wah Wu_, Apr 20 2023 %p A362413 a:= n-> `if`(n=0, 1, q(n)*(n-1)!): %p A362413 p:= n-> `if`(n<3, 1, 3-irem(n, 2)): %p A362413 q:= proc(n) option remember; %p A362413 p(n)+add(p(n-i)*q(i)/i, i=1..n-1) %p A362413 end: %p A362413 seq(a(n), n=0..21); # _Alois P. Heinz_, Apr 19 2023 %t A362413 a[n_] := If[n == 0, 1, q[n]*(n-1)!]; %t A362413 p[n_] := If[n < 3, 1, 3-Mod[n, 2]]; %t A362413 q[n_] := q[n] = p[n] + Sum[p[n-i]*q[i]/i, {i, 1, n-1}]; %t A362413 Table[a[n], {n, 0, 21}] (* _Jean-François Alcover_, Jul 24 2025, after _Alois P. Heinz_ *) %o A362413 (SageMath) %o A362413 x = LazyPowerSeriesRing(QQ, "x").gen() %o A362413 egf = exp(-x * (x + 1)) / sqrt((x + 1) * (1 - x)^5) %o A362413 [egf[n] * factorial(n) for n in range(22)] # _Peter Luschny_, Apr 20 2023 %o A362413 (Python) %o A362413 from math import factorial %o A362413 from fractions import Fraction %o A362413 from functools import lru_cache %o A362413 @lru_cache(maxsize=None) %o A362413 def A362413(n): return int(((1 if n<=2 else (2 if n&1 else 3))+sum(Fraction((1 if n-i<=2 else (2 if n-i&1 else 3))*A362413(i),factorial(i)) for i in range(1,n)))*factorial(n-1)) if n else 1 # _Chai Wah Wu_, Apr 20 2023 %Y A362413 Cf. A052127, A357571. %K A362413 nonn %O A362413 0,3 %A A362413 _Zelin Lv_, Apr 18 2023