login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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
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