OFFSET
1,1
COMMENTS
A subsequence of A254671.
Is 49 the only odd term?
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
Alex Ratushnyak, May 27 2015
STATUS
approved