OFFSET
1,1
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000 (terms 1..250 from Reinhard Zumkeller).
EXAMPLE
a(1) = 1729 = 3^2+3*40+40^2 = 8^2+8*37+37^2 = 15^2+15*32+32^2 = 23^2+23*25+25^2, A088534(1729) = 4;
a(10) = 5719 = 5^2+5*73+73^2 = 15^2+15*67+67^2 = 18^2+18*65+65^2 = 37^2+37*50+50^2, A088534(5719) = 4;
a(100) = 23779 = 17^2+17*145+145^2 = 30^2+30*137+137^2 = 50^2+50*123+123^2 = 85^2+85*93+93^2, A088534(23779) = 4.
MATHEMATICA
amax = 20000; xmax = Sqrt[amax] // Ceiling; Clear[f]; f[_] = 0; Do[q = x^2 + x y + y^2; f[q] = f[q] + 1, {x, 0, xmax}, {y, x, xmax}];
A198775 = Select[Range[0, 3 xmax^2], # <= amax && f[#] == 4&] (* Jean-François Alcover, Jun 21 2018 *)
PROG
(Haskell)
a198775 n = a198775_list !! (n-1)
a198775_list = filter ((== 4) . a088534) a003136_list
(Python)
from itertools import count, islice
def A198775_gen(startvalue=1): # generator of terms >= startvalue
for n in count(max(startvalue, 1)):
c = 0
for y in range(n+1):
if c > 4 or y**2 > n:
break
for x in range(y+1):
z = x*(x+y)+y**2
if z > n:
break
elif z == n:
c += 1
if c > 4:
break
if c == 4:
yield n
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Oct 30 2011
STATUS
approved