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

A226472
Numbers n such that n^2 XOR triangular(n) is a perfect square. XOR is the bitwise logical exclusive-or operator.
0
0, 1, 6, 8, 4086, 24136, 162297, 7868054, 29792904, 22666693375
OFFSET
1,3
COMMENTS
Indices of perfect squares in A226470. No other terms below 2^35. Roots of generated squares: 0, 0, 7, 10, 2915, 29506, 149434, 6328037, 27602118, 20243443647.
EXAMPLE
8^2 XOR triangular(8) = 64 XOR 36 = 100, because 100 is a perfect square, 8 is in the sequence.
PROG
(C)
#include <stdio.h>
#include <math.h>
int main() {
for (unsigned long long a, r, n=0; n < (1ULL<<32); ++n) {
a = (n*n) ^ (n*(n+1)/2);
r = sqrt(a);
if (r*r==a) printf("%llu, ", n);
}
return 0;
}
CROSSREFS
KEYWORD
nonn,more,base
AUTHOR
Alex Ratushnyak, Jun 08 2013
STATUS
approved