login
A348169
Positive integers which can be represented as A*(x^2 + y^2 + z^2) = B*(x*y + x*z + y*z) with positive integers x, y, z, A, B and gcd(A,B)=1.
1
3, 12, 18, 27, 30, 42, 48, 72, 75, 77, 98, 108, 120, 147, 154, 162, 168, 192, 243, 255, 260, 264, 270, 272, 273, 285, 288, 297, 300, 308, 338, 363, 378, 392, 432, 450, 462, 480, 490, 494, 507, 510, 513, 588, 616, 630, 648, 672, 675, 693, 702, 714, 722, 750, 754, 768, 798
OFFSET
1,1
COMMENTS
The sequence represents a generalization of cases A033428 (k=1), A347960 (k=2), A347969 (k=5) with all possible k given by A331605. Instead of integer k, it utilizes the ratio B/A.
LINKS
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
A348169_list = list(islice(A348169(), 57)) # Chai Wah Wu, Nov 26 2021
CROSSREFS
The sequence contains A033428 (A=B=1), A347969 (B=2*A), A347960 (B=5*A).
Sequence in context: A239052 A063229 A061564 * A342785 A166038 A052637
KEYWORD
nonn
AUTHOR
Alexander Kritov, Oct 04 2021
STATUS
approved