cp's OEIS Frontend

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.

A362413 The second moment of an n X n symmetric random +-1 matrix.

Original entry on oeis.org

1, 1, 2, 8, 44, 244, 1744, 13768, 127952, 1270736, 14384096, 172799296, 2306400832, 32442943168, 498547591424, 8031916728704, 139611091407104, 2533449773986048, 49133884886866432, 991341134236389376, 21218511171980205056, 471083434031674336256
Offset: 0

Views

Author

Zelin Lv, Apr 18 2023

Keywords

Comments

This sequence gives the expectation of the second moment of a random symmetric sign matrix of size n X n.

References

  • Zelin Lv, On The Moments of Random Determinants, Master Thesis, the University of Chicago.
  • I. G. Zhurbenko, Moments of random determinants, Theory of Probability & Its Application, 13(4):682-686, 1968.

Crossrefs

Programs

  • Maple
    a:= n-> `if`(n=0, 1, q(n)*(n-1)!):
    p:= n-> `if`(n<3, 1, 3-irem(n, 2)):
    q:= proc(n) option remember;
          p(n)+add(p(n-i)*q(i)/i, i=1..n-1)
        end:
    seq(a(n), n=0..21);  # Alois P. Heinz, Apr 19 2023
  • Mathematica
    a[n_] := If[n == 0, 1, q[n]*(n-1)!];
    p[n_] := If[n < 3, 1, 3-Mod[n, 2]];
    q[n_] := q[n] = p[n] + Sum[p[n-i]*q[i]/i, {i, 1, n-1}];
    Table[a[n], {n, 0, 21}] (* Jean-François Alcover, Jul 24 2025, after Alois P. Heinz *)
  • Python
    from math import factorial
    from fractions import Fraction
    from functools import lru_cache
    @lru_cache(maxsize=None)
    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
  • SageMath
    x = LazyPowerSeriesRing(QQ, "x").gen()
    egf = exp(-x * (x + 1)) / sqrt((x + 1) * (1 - x)^5)
    [egf[n] * factorial(n) for n in range(22)]  # Peter Luschny, Apr 20 2023
    

Formula

f^(sym)_2(n) = q(n) * (n-1)!, where
p(n) =
1, if n <= 2
2, if n >= 3 and n is odd
3, if n >= 4 and n is even
q(n) = p(n) + Sum_{i=1..n-1}(p(i) * q(n-i)) / (n-i).
E.g.f.: exp(-x*(x+1))/sqrt((x+1)*(1-x)^5). - Alois P. Heinz, Apr 19 2023
a(n) ~ 4*n^(n+2)/ (3*exp(n+2)). - Vaclav Kotesovec, Apr 20 2023
a(n) = (p(n) + Sum_{i=1..n-1} p(n-i) * a(i)/i! ) * (n-1)!. - Chai Wah Wu, Apr 20 2023