OFFSET
1,5
FORMULA
Upper bound: (a(n) + 1) * (2*a(n) + 1) <= 6*n. Proof: Because (Sum_{m=1..k} (i_m)^2)/k = n, n*k = Sum_{m=1..k} (i_m)^2. Since each i_m is distinct, n*k >= Sum_{m=1..k} m^2 = k * (k + 1) * (2*k + 1)/6, hence (k + 1) * (2*k + 1) <= 6*n.
a(A132777(n)) = 2. - Thomas Scheuerle, Apr 16 2023
EXAMPLE
For n = 2, if k = 1, 2*1 = 2 is not a square; but, from the upper bound formula, (k + 1) * (2*k + 1) <= 12, so k <= 1. So, a satisfactory k does not exist; hence a(2) = 0.
CROSSREFS
KEYWORD
nonn
AUTHOR
Yifan Xie, Apr 16 2023
EXTENSIONS
Name qualified and other edits by Peter Munn, Apr 21 2023
STATUS
approved