login
Numbers k such that A246600(k) = 2.
3

%I #13 Jun 21 2023 06:46:20

%S 3,5,6,7,9,10,11,12,13,14,17,18,19,20,21,22,23,24,25,26,28,29,31,33,

%T 34,35,36,37,38,40,41,42,43,44,46,47,48,49,50,52,53,56,57,58,59,61,62,

%U 65,66,67,68,69,70,71,72,73,74,76,77,79,80,81,82,83,84,86,88

%N Numbers k such that A246600(k) = 2.

%C A subsequence of A080943 and first differs from it at n = 42: A080943(42) = 55 is not a term of this sequence.

%C Numbers k such that A246600(k) = 1 are the powers of 2 (A000079).

%C Numbers k that have exactly 2 divisors d such that the bitwise AND of k and d is equal to d, or equivalently, the bitwise OR of k and d is equal to k. These two divisors are k and the highest power of 2 dividing k, A006519(k).

%C Includes all the even squarefree semiprimes (i.e., the odd primes doubled, A100484 \ {4}).

%C If k is a term then 2*k is also a term. The primitive terms are the odd terms of this sequence, A363691.

%C The numbers of terms not exceeding 10^k, for k = 1, 2, ..., are 6, 76, 681, 6268, 60002, 587247, 5811449, 57817051, 576781821, 5761341533, 57583082392, 575687822743, ... . Apparently, the asymptotic density of this sequence exists and equals 0.575... .

%H Amiram Eldar, <a href="/A363690/b363690.txt">Table of n, a(n) for n = 1..10000</a>

%t q[n_] := DivisorSum[n, Boole[BitOr[#, n] == n] &] == 2; Select[Range[100], q]

%o (PARI) is(n) = sumdiv(n, d, bitor(d, n) == n) == 2;

%o (Python)

%o from itertools import count, islice

%o from sympy import divisors

%o def A363690_gen(startvalue=2): # generator of terms >= startvalue

%o return filter(lambda n:(m:=n&-n)!=n and all(d==m or d==n or n|d!=n for d in divisors(n,generator=True)),count(max(startvalue,2)))

%o A363690_list = list(islice(A363690_gen(),20)) # _Chai Wah Wu_, Jun 20 2023

%Y Cf. A000079, A006519, A080943, A100484, A246600, A363691.

%K nonn,base,easy

%O 1,1

%A _Amiram Eldar_, Jun 16 2023