login
Numbers k such that k^2 XOR (k+1)^2 is a square, where XOR is the bitwise XOR operator.
7

%I #32 Jan 09 2026 12:36:19

%S 0,3,4,23,24,43,44,76,111,112,115,139,164,180,183,248,264,323,327,348,

%T 411,479,480,499,611,699,747,787,943,976,1072,1103,1111,1176,1268,

%U 1388,1447,1576,1684,1851,1983,1984,2008,2243,2692,3271,3383,3452,3464,3532,3679,3804,3867

%N Numbers k such that k^2 XOR (k+1)^2 is a square, where XOR is the bitwise XOR operator.

%o (Python)

%o import math

%o for i in range(4000):

%o s = (i*i) ^ ((i+1)*(i+1))

%o t = math.isqrt(s)

%o if s == t*t:

%o print(i, end=', ')

%Y Cf. A145827, A001737.

%K nonn,base

%O 1,2

%A _Alex Ratushnyak_, Mar 27 2013