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”).

A224242
Numbers k such that k^2 XOR (k+1)^2 is a square, and k^2 XOR (k-1)^2 is a square, where XOR is the bitwise logical XOR operator.
0
0, 4, 24, 44, 112, 480, 1984, 8064, 32512, 130560, 263160, 278828, 340028, 523264, 2095104, 8384512, 25239472, 32490836, 33546240, 134201344, 536838144, 2147418112
OFFSET
1,2
COMMENTS
A subsequence of A221643: k's such that A221643(k) = A221643(k-1) + 1.
A059153 is a subsequence. Terms that are not in A059153: 0, 44, 263160, 278828, 340028, 25239472, 32490836. Conjecture: the subsequence of non-A059153 terms is infinite.
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
Sequence in context: A031117 A174178 A139245 * A066770 A080380 A364278
KEYWORD
nonn,base,less
AUTHOR
Alex Ratushnyak, Apr 01 2013
STATUS
approved