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.

A359080 Numbers k such that A246600(k) = A000005(k).

Original entry on oeis.org

1, 3, 5, 7, 11, 13, 15, 17, 19, 23, 27, 29, 31, 37, 41, 43, 47, 51, 53, 59, 61, 63, 67, 71, 73, 79, 83, 85, 89, 95, 97, 101, 103, 107, 109, 111, 113, 119, 123, 125, 127, 131, 137, 139, 143, 149, 151, 157, 163, 167, 173, 179, 181, 187, 191, 193, 197, 199, 211, 219
Offset: 1

Views

Author

Amiram Eldar, Dec 15 2022

Keywords

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

Crossrefs

Subsequence of A102553.
Subsequences: A000225, A065091.

Programs

  • Mathematica
    s[n_] := DivisorSum[n, 1 &, BitAnd[n, #] == # &]; Select[Range[250], s[#] == DivisorSigma[0, #] &]
  • 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)),
        )
    A359080_list = list(islice(A359080_gen(), 20))  # Chai Wah Wu, Dec 18 2022
    print(A359080_list)