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.
%I A375485 #8 Aug 18 2024 09:05:28 %S A375485 0,0,2,2,2,2,4,4,2,2,4,4,4,4,6,6,5,5,7,7,7,7,9,9,7,7,9,9,9,9,11,11,7, %T A375485 7,9,9,9,9,11,11,9,9,11,11,11,11,13,13,12,12,14,14,14,14,16,16,14,14, %U A375485 16,16,16,16,18,18,13,13,15,15,15,15,17,17,15,15,17 %N A375485 a(n) is the number of integers k between 0 and n such that n XOR k is a prime number (where XOR denotes the bitwise XOR operator). %H A375485 Rémy Sigrist, <a href="/A375485/b375485.txt">Table of n, a(n) for n = 0..8192</a> %H A375485 Rémy Sigrist, <a href="/A375485/a375485.png">Scatterplot of (n, k) such that 0 <= k <= n <= 1024 and n XOR k is prime</a> %F A375485 Empirically, if 2^k <= n < 2^(k+1) then a(n) + a(A054429(n)) only depends on k. %e A375485 The first terms, alongside the corresponding k's, are: %e A375485 n a(n) k's %e A375485 -- ---- ------------------- %e A375485 0 0 None %e A375485 1 0 None %e A375485 2 2 0, 1 %e A375485 3 2 0, 1 %e A375485 4 2 1, 3 %e A375485 5 2 0, 2 %e A375485 6 4 1, 3, 4, 5 %e A375485 7 4 0, 2, 4, 5 %e A375485 8 2 3, 5 %e A375485 9 2 2, 4 %e A375485 10 4 1, 7, 8, 9 %e A375485 11 4 0, 6, 8, 9 %e A375485 12 4 1, 7, 9, 11 %e A375485 13 4 0, 6, 8, 10 %e A375485 14 6 3, 5, 9, 11, 12, 13 %e A375485 15 6 2, 4, 8, 10, 12, 13 %o A375485 (PARI) a(n) = sum(k = 0, n, isprime(bitxor(n, k))) %Y A375485 Cf. A054429, A375486 (OR variant), A375487 (AND variant). %K A375485 nonn,base,easy %O A375485 0,3 %A A375485 _Rémy Sigrist_, Aug 17 2024