login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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

%I

%S 24,49,84,184,288,504,628,984,1284,1368,1716,2004,2884,3348,3384,3736,

%T 4368,6484,6816,7288,8004,9508,9808,10200,11508,14584,14836,15684,

%U 19896,21348,21784,22048,25048,25956,27216,27384,35284,38808,40500,40504,44184,47988,49588,50628

%N 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.

%C A subsequence of A254671.

%C Is 49 the only odd term?

%e 24 = 4*4 + 4 + 4.

%e 49 = 9*4 + 9 + 4, and because this is the only representation, 49 is in the sequence.

%e 129 = 4*25+25+4 = 12*9 + 12 + 9, and because 12 is not a square, 129 is not a term.

%o (Python)

%o def isqrt(a):

%o sr = 1L << (long.bit_length(long(a)) >> 1)

%o while a < sr*sr: sr>>=1

%o b = sr>>1

%o while b:

%o s = sr+b

%o if a >= s*s: sr = s

%o b>>=1

%o return sr

%o def isSquare(a):

%o sr = isqrt(a)

%o return (a==sr*sr)

%o TOP = 100000

%o a = [0]*TOP

%o no= [0]*TOP

%o for y in xrange(2, TOP/2):

%o for x in xrange(y, TOP/2):

%o k = x*y + x + y

%o if k>=TOP: break

%o if no[k]==0:

%o a[k]=1

%o if not (isSquare(x) and isSquare(y)):

%o no[k]=1

%o print [n for n in xrange(TOP) if a[n]>0 and no[n]==0]

%Y Cf. A254671, A256073, A000290.

%K nonn

%O 1,1

%A _Alex Ratushnyak_, May 27 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 22 14:44 EDT 2019. Contains 328318 sequences. (Running on oeis4.)