OFFSET
1,2
COMMENTS
Numbers k such that for all the divisors d of k the bitwise OR of k and d is equal to k (or equivalently, the bitwise AND of k and d is equal to d).
Subsequence of A102553. Terms of A102553 that are not in this sequence: 2, 135, 175, 243, 343, ... .
All the terms are odd since if k is even and d = 1 then bitor(k, 1) > k and thus A246600(k) < A000005(k).
All the odd primes are terms.
All the numbers of the form 2^k-1 (A000225) are terms.
Numbers k such that the bitwise OR(k, d_1, d_2, ..., d_m) = k, where d_1, ..., d_m are the divisors of k. - Chai Wah Wu, Dec 18 2022
LINKS
MATHEMATICA
s[n_] := DivisorSum[n, 1 &, BitAnd[n, #] == # &]; Select[Range[250], s[#] == DivisorSigma[0, #] &]
PROG
(PARI) is(n) = sumdiv(n, d, bitor(d, n) == n) == numdiv(n);
(Python)
from itertools import count, islice
from operator import ior
from functools import reduce
from sympy import divisors
def A359080_gen(startvalue=1): # generator of terms >= startvalue
return filter(
lambda n: n | reduce(ior, divisors(n, generator=True)) == n,
count(max(startvalue, 1)),
)
print(A359080_list)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Dec 15 2022
STATUS
approved