cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A224242 #17 Nov 10 2022 12:10:34
%S A224242 0,4,24,44,112,480,1984,8064,32512,130560,263160,278828,340028,523264,
%T A224242 2095104,8384512,25239472,32490836,33546240,134201344,536838144,
%U A224242 2147418112
%N 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.
%C A224242 A subsequence of A221643: k's such that A221643(k) = A221643(k-1) + 1.
%C A224242 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.
%t A224242 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 *)
%o A224242 (C)
%o A224242 #include <stdio.h>
%o A224242 #include <math.h>
%o A224242 int main() {
%o A224242   unsigned long long a, i, t;
%o A224242   for (i=0; i < (1L<<32)-1; ++i) {
%o A224242       a = (i*i) ^ ((i+1)*(i+1));
%o A224242       t = sqrt(a);
%o A224242       if (a != t*t) continue;
%o A224242       a = (i*i) ^ ((i-1)*(i-1));
%o A224242       t = sqrt(a);
%o A224242       if (a != t*t) continue;
%o A224242       printf("%llu, ", i);
%o A224242   }
%o A224242   return 0;
%o A224242 }
%Y A224242 Cf. A221643, A059153.
%K A224242 nonn,base,less
%O A224242 1,2
%A A224242 _Alex Ratushnyak_, Apr 01 2013