OFFSET
3,8
COMMENTS
For n >= 3 then there exists (p, q, r) | p + q + r = n such that p + 11*q + 13*r is a perfect square. This has been proven by Sylvester's theorem.
LINKS
Hoang Xuan Thanh, Table of n, a(n) for n = 3..20000
FORMULA
Conjecture: a(n) ~ K * n^(3/2) where K = 0.0914... from a(10000) = 91413 and a(20000) = 258667.
K = (1 - 66*sqrt(11) + 65*sqrt(13))/180. - Hoang Xuan Thanh, Sep 13 2025
EXAMPLE
n = 12: (4,4,4); 4 + 11*4 + 13*4 = 10^2; (7,4,1); 7 + 11*4 + 13*1 = 8^2; so a(12) = 2.
MATHEMATICA
a[n_]:=Module[{cnt=0, p, m2}, Do[Do[p=n-q-r; m2=p +11*q+13*r; If[IntegerQ[Sqrt[m2]], cnt++], {r, 1, n - q - 1}], {q, 1, n-2}]; cnt]; Array[a, 78, 3] (* James C. McMahon, Jul 22 2025 *)
PROG
(PARI) a(n) = {my(cnt = 0); for (q = 1, n-2, for (r = 1, n - q - 1, p = n - q - r; m2 = p + 11*q + 13*r; if (issquare(m2), cnt++); ); ); cnt; }
CROSSREFS
KEYWORD
nonn
AUTHOR
Hoang Xuan Thanh, Jul 16 2025
STATUS
approved
