OFFSET
0,3
COMMENTS
a(n) is the sharp upper bound of the number of edges in a graph of n vertices that does not contain a cycle of length 4.
REFERENCES
Miklos Bona, Introduction to Enumerative and Analytic Combinatorics, CRC Press, 2025, pp. 334-336.
MATHEMATICA
a[n_]:=Floor[n(Sqrt[n-1]+2)/2]; Array[a, 61, 0]
PROG
(Python)
from math import isqrt
def A394869(n): return n+(isqrt(n**2*(n-1))>>1) # Chai Wah Wu, Apr 06 2026
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Stefano Spezia, Apr 05 2026
STATUS
approved
