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.

A375486 a(n) is the number of integers k between 0 and n such that n OR k is a prime number (where OR denotes the bitwise OR operator).

This page as a plain text file.
%I A375486 #7 Aug 18 2024 09:05:20
%S A375486 0,0,3,4,2,6,3,8,2,4,3,8,3,8,0,0,5,12,7,16,7,14,11,24,6,12,6,12,14,30,
%T A375486 15,32,7,14,6,12,9,20,4,8,13,28,17,36,11,22,15,32,9,18,6,12,13,28,0,0,
%U A375486 14,28,15,32,15,32,0,0,13,26,15,32,13,26,19,40,14
%N A375486 a(n) is the number of integers k between 0 and n such that n OR k is a prime number (where OR denotes the bitwise OR operator).
%H A375486 Rémy Sigrist, <a href="/A375486/b375486.txt">Table of n, a(n) for n = 0..8192</a>
%H A375486 Rémy Sigrist, <a href="/A375486/a375486.png">Scatterplot of (n, k) such that 0 <= k <= n <= 1024 and n OR k is prime</a>
%e A375486 The first terms, alongside the corresponding k's, are:
%e A375486   n   a(n)  k's
%e A375486   --  ----  ------------------------
%e A375486    0     0  None
%e A375486    1     0  None
%e A375486    2     3  0, 1, 2
%e A375486    3     4  0, 1, 2, 3
%e A375486    4     2  1, 3
%e A375486    5     6  0, 1, 2, 3, 4, 5
%e A375486    6     3  1, 3, 5
%e A375486    7     8  0, 1, 2, 3, 4, 5, 6, 7
%e A375486    8     2  3, 5
%e A375486    9     4  2, 3, 4, 5
%e A375486   10     3  1, 3, 9
%e A375486   11     8  0, 1, 2, 3, 8, 9, 10, 11
%e A375486   12     3  1, 5, 9
%e A375486   13     8  0, 1, 4, 5, 8, 9, 12, 13
%e A375486   14     0  None
%e A375486   15     0  None
%o A375486 (PARI) a(n) = sum(k = 0, n, isprime(bitor(n, k)))
%Y A375486 Cf. A375485 (XOR variant), A375487 (AND variant).
%K A375486 nonn,base,easy
%O A375486 0,3
%A A375486 _Rémy Sigrist_, Aug 17 2024