OFFSET

1,1

COMMENTS

Odd 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 1 and k.

LINKS

Amiram Eldar, Table of n, a(n) for n = 1..10000

MATHEMATICA

q[n_] := DivisorSum[n, Boole[BitOr[#, n] == n] &] == 2; Select[Range[1, 200, 2], q]

PROG

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

(Python)

from itertools import count, islice

from sympy import divisors

def A363691_gen(startvalue=3): # generator of terms >= startvalue

return filter(lambda n:all(d==1 or d==n or n|d!=n for d in divisors(n, generator=True)), count(max(startvalue, 3)|1, 2))

CROSSREFS

KEYWORD

nonn,base,easy

AUTHOR

Amiram Eldar, Jun 16 2023

STATUS

approved