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.

A331532 a(n) is the number of nonnegative integers k such that (n^2) AND (k^2) = k^2 (where AND denotes the bitwise AND operator).

This page as a plain text file.
%I A331532 #12 Jan 20 2020 12:46:51
%S A331532 1,2,2,3,2,5,3,4,2,5,5,9,3,4,4,4,2,4,5,7,5,12,9,4,3,9,4,11,4,7,4,6,2,
%T A331532 5,4,7,5,12,7,15,5,7,12,13,9,17,4,3,3,7,9,4,4,20,11,15,4,8,7,12,4,5,6,
%U A331532 6,2,4,5,7,4,11,7,14,5,12,12,29,7,8,15,5,5
%N A331532 a(n) is the number of nonnegative integers k such that (n^2) AND (k^2) = k^2 (where AND denotes the bitwise AND operator).
%C A331532 Equivalently, this is the number of nonnegative integers k such that (n^2) OR (k^2) = n^2 (where OR denotes the bitwise OR operator); this connects this sequence to A001316.
%H A331532 Rémy Sigrist, <a href="/A331532/b331532.txt">Table of n, a(n) for n = 0..8192</a>
%H A331532 Rémy Sigrist, <a href="/A331532/a331532.png">Scatterplot of (x, y) such that (x^2) AND (y^2) = y^2, with 0 <= x <= 1024</a>
%F A331532 a(2^k) = 2 for any k >= 0.
%F A331532 a(n) <= n+1.
%e A331532 For n = 7:
%e A331532 - we have:
%e A331532   k  7^2 AND k^2
%e A331532   -  -----------
%e A331532   0  0 = 0
%e A331532   1  1 = 1
%e A331532   2  0 <> 4
%e A331532   3  1 <> 9
%e A331532   4  16 = 16
%e A331532   5  17 <> 25
%e A331532   6  32 <> 36
%e A331532   7  49 = 49
%e A331532 - hence a(7) = 4.
%o A331532 (PARI) a(n) = sum(k=0, n, bitand(n^2, k^2)==k^2)
%Y A331532 Cf. A001316, A331533 (corresponding k's).
%K A331532 nonn,base
%O A331532 0,2
%A A331532 _Rémy Sigrist_, Jan 19 2020