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.

A102210 Number of primes that are bitwise covered by n.

This page as a plain text file.
%I A102210 #18 Sep 08 2022 08:45:16
%S A102210 0,1,2,0,1,1,4,0,0,1,3,0,2,1,6,0,1,1,4,0,2,1,7,0,1,1,5,0,4,1,11,0,0,1,
%T A102210 2,0,2,1,5,0,1,1,5,0,4,1,10,0,1,1,4,0,4,1,9,0,2,1,8,0,8,1,18,0,0,1,3,
%U A102210 0,1,1,6,0,1,1,5,0,3,1,10,0,1,1,6,0,2,1,10,0,3,1,9,0,6,1,17,0,1,1,4,0,4,1
%N A102210 Number of primes that are bitwise covered by n.
%C A102210 p is bitwise covered by n iff (p = (n AND p)) bitwise: A080099(n,p)=p.
%H A102210 Amiram Eldar, <a href="/A102210/b102210.txt">Table of n, a(n) for n = 1..10000</a>
%H A102210 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%F A102210 a(A102211(n)) = 0; a(A102212(n)) = 1; a(A102213(n)) > 1.
%F A102210 a(2^k-1) = A007053(k) for k > 1. - _Amiram Eldar_, Jan 12 2020
%e A102210 n=21->10101 -> a(21) = #{00101=5,10001=17} = 2.
%t A102210 a[n_] := Count[Range[n], _?(PrimeQ[#] && BitAnd[n, #] == # &)]; Array[a, 100] (* _Amiram Eldar_, Jan 12 2020 *)
%o A102210 (Magma) [#[p:p in PrimesUpTo(n)| p eq BitwiseAnd(n,p)] :n in [1..105] ]; // _Marius A. Burtea_, Jan 12 2020
%Y A102210 Cf. A007053, A007088, A004676, A080099, A102211, A102212, A102213, A102550.
%K A102210 nonn,base
%O A102210 1,3
%A A102210 _Reinhard Zumkeller_, Dec 30 2004