OFFSET
0,5
COMMENTS
For a guide to related sequences, see A211422.
The original name was "... and w^2 = x*y + 2n", but this would yield 2 instead of 0 for a(3), as observed by Pontus von Brömssen. The corresponding sequence seems not to be in the OEIS yet. - M. F. Hasler, Jan 26 2020
LINKS
Pontus von Brömssen, Table of n, a(n) for n = 0..1024
EXAMPLE
From Bernard Schott, Jan 26 2020: (Start)
For n = 4, there are 3 ordered solutions with (1,3,3), (2,3,4) and (2,4,3) so a(4) = 3.
For n = 5, there is no solution, hence a(5) = 0.
The only solution for n = 6 is (2,4,4) with 2^2 = 4*4 - 2*6, hence a(6) = 1. (End)
MATHEMATICA
t[n_] := t[n] = Flatten[Table[w^2 - x*y + 2 n, {w, 1, n}, {x, 1, n}, {y, 1, n}]]
c[n_] := Count[t[n], 0]
t = Table[c[n], {n, 0, 70}] (* A211510 *)
PROG
(Python)
import sympy
def A211510(n): return sum(x<=n and x*n>=w**2+2*n for w in range(1, n+1) for x in sympy.divisors(w**2+2*n)) # Pontus von Brömssen, Jan 26 2020
(PARI) apply( {A211510(n)=sum(w=1, n-2, my(w2n=(w^2-1)\n+2, s); fordiv(w^2+2*n, x, x>w2n||next; x>n&&break; s++); s)}, [1..100]) \\ M. F. Hasler, Jan 26 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Apr 14 2012
EXTENSIONS
Name corrected by Pontus von Brömssen, Jan 26 2020
STATUS
approved