login
A331531
Numbers of the form (x^2) OR (y^2) with x, y >= 0 (where OR denotes the bitwise OR operator).
3
0, 1, 4, 5, 9, 13, 16, 17, 20, 25, 29, 36, 37, 45, 49, 52, 53, 57, 61, 64, 65, 68, 73, 80, 81, 85, 89, 100, 101, 109, 113, 116, 117, 121, 125, 144, 145, 148, 153, 169, 173, 177, 180, 185, 196, 197, 205, 208, 209, 212, 213, 221, 225, 228, 229, 233, 237, 241
OFFSET
1,3
COMMENTS
All squares belong to the sequence.
LINKS
EXAMPLE
The first terms, alongside the corresponding decompositions, are:
n a(n) Corresponding (x, y) (with x<=y)
-- ---- -----------------------------------------
1 0 (0, 0)
2 1 (0, 1) (1, 1)
3 4 (0, 2) (2, 2)
4 5 (1, 2)
5 9 (0, 3) (1, 3) (3, 3)
6 13 (2, 3)
7 16 (0, 4) (4, 4)
8 17 (1, 4)
9 20 (2, 4)
10 25 (0, 5) (1, 5) (3, 4) (3, 5) (4, 5) (5, 5)
PROG
(PARI) is(n) = setsearch(setbinop(bitor, select(x2 -> bitand(n, x2)==x2, vector(1+sqrtint(n), x, (x-1)^2))), n)>0
CROSSREFS
Cf. A000290, A331534 (least x), A331535 (corresponding y).
Sequence in context: A006844 A022425 A277549 * A363319 A363267 A328223
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Jan 19 2020
STATUS
approved