OFFSET
1,1
COMMENTS
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
Alexander Kritov, Source code
EXAMPLE
a(6)=42: the quintuple (x,y,z) A,B is 1,2,4 (2,3) because 42 = 2*(1^2 + 2^2 + 4^2) = 3*(1*4 + 1*2 + 2*4).
a(n) (x,y,z) A, B
3 (1,1,1) 1, 1
12 (2,2,2) 1, 1
18 (1,1,4) 1, 2
27 (3,3,3) 1, 1
30 (1,1,2) 5, 6
42 (1,2,4) 2, 3
48 (4,4,4) 1, 1
72 (1,2,2) 8, 9 [also (2,2,8) 1, 2]
75 (5,5,5) 1, 1
77 (1,1,3) 7, 11
98 (1,4,9) 1, 2
108 (6,6,6) 1, 1
120 (2,2,4) 5, 6
147 (7,7,7) 1, 1
154 (1,2,3) 11, 14
162 (3,3,12) 1, 2
168 (2,4,8) 2, 3
192 (8,8,8) 1, 1
243 (9,9,9) 1, 1
255 (1,1,7) 5, 17
260 (2,5,6) 4, 5
264 (1,4,4) 8, 11
270 (2,5,5) 5, 6
272 (2,2,3) 16, 17
288 (4,4,2) 8, 9 [also (4,4,16) 1, 2]
PROG
(C) /* See links */
(Python)
from itertools import islice, count
from math import gcd
from sympy import divisors, integer_nthroot
def A348169(): # generator of terms
for n in count(1):
for d in divisors(n, generator=False):
x, x2 = 1, 1
while 3*x2 <= d:
y, y2 = x, x2
z2 = d-x2-y2
while z2 >= y2:
z, w = integer_nthroot(z2, 2)
if w:
A = n//d
B, u = divmod(n, x*(y+z)+y*z)
if u == 0 and gcd(A, B) == 1:
yield n
break
y += 1
y2 += 2*y-1
z2 -= 2*y-1
else:
x += 1
x2 += 2*x-1
continue
break
else:
continue
break
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Alexander Kritov, Oct 04 2021
STATUS
approved