OFFSET
1,2
COMMENTS
MATHEMATICA
Select[Range[0, 84*10^5], AllTrue[{Sqrt[BitXor[#^2, (#+1)^2]], Sqrt[BitXor[#^2, (#-1)^2] ]}, IntegerQ]&] (* The program generates the first 16 terms of the sequence. *) (* Harvey P. Dale, Nov 10 2022 *)
PROG
(C)
#include <stdio.h>
#include <math.h>
int main() {
unsigned long long a, i, t;
for (i=0; i < (1L<<32)-1; ++i) {
a = (i*i) ^ ((i+1)*(i+1));
t = sqrt(a);
if (a != t*t) continue;
a = (i*i) ^ ((i-1)*(i-1));
t = sqrt(a);
if (a != t*t) continue;
printf("%llu, ", i);
}
return 0;
}
CROSSREFS
KEYWORD
nonn,base,less
AUTHOR
Alex Ratushnyak, Apr 01 2013
STATUS
approved