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.

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

Original entry on oeis.org

0, 3, 4, 23, 24, 43, 44, 76, 111, 112, 115, 139, 164, 180, 183, 248, 264, 323, 327, 348, 411, 479, 480, 499, 611, 699, 747, 787, 943, 976, 1072, 1103, 1111, 1176, 1268, 1388, 1447, 1576, 1684, 1851, 1983, 1984, 2008, 2243, 2692, 3271, 3383, 3452, 3464, 3532, 3679, 3804, 3867
Offset: 1

Views

Author

Alex Ratushnyak, Mar 27 2013

Keywords

Crossrefs

Programs

  • Python
    import math
    for i in range(1<<16):
        s = (i*i) ^ ((i+1)*(i+1))
        t = int(math.sqrt(s))
        if s == t*t:
            print(str(i), end=',')