|
|
A258366
|
|
Numbers n representable as x*y + x + y, where x >= y > 1, such that all x's and y's in all representation(s) of n are perfect squares.
|
|
0
|
|
|
24, 49, 84, 184, 288, 504, 628, 984, 1284, 1368, 1716, 2004, 2884, 3348, 3384, 3736, 4368, 6484, 6816, 7288, 8004, 9508, 9808, 10200, 11508, 14584, 14836, 15684, 19896, 21348, 21784, 22048, 25048, 25956, 27216, 27384, 35284, 38808, 40500, 40504, 44184, 47988, 49588, 50628
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Is 49 the only odd term?
|
|
LINKS
|
|
|
EXAMPLE
|
24 = 4*4 + 4 + 4.
49 = 9*4 + 9 + 4, and because this is the only representation, 49 is in the sequence.
129 = 4*25+25+4 = 12*9 + 12 + 9, and because 12 is not a square, 129 is not a term.
|
|
PROG
|
(Python)
def isqrt(a):
sr = 1 << (int.bit_length(int(a)) >> 1)
while a < sr*sr: sr>>=1
b = sr>>1
while b:
s = sr+b
if a >= s*s: sr = s
b>>=1
return sr
def isSquare(a):
sr = isqrt(a)
return a==sr*sr
TOP = 100000
a = [0]*TOP
no= [0]*TOP
for y in range(2, TOP//2):
for x in range(y, TOP//2):
k = x*y + x + y
if k>=TOP: break
if no[k]==0:
a[k]=1
if not (isSquare(x) and isSquare(y)):
no[k]=1
print([n for n in range(TOP) if a[n]>0 and no[n]==0])
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|