|
|
A102553
|
|
Numbers k such that for all prime-factors p: p = (k AND p), bitwise.
|
|
6
|
|
|
1, 2, 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, 135, 137, 139, 143, 149, 151, 157, 163, 167, 173, 175, 179, 181, 187, 191, 193, 197, 199
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Apart from first term, subsequence of A102552;
Numbers k such that the bitwise OR of k with all prime divisors of k is equal to k. - Chai Wah Wu, Dec 18 2022
|
|
LINKS
|
|
|
MATHEMATICA
|
okQ[n_] := AllTrue[FactorInteger[n][[All, 1]], # == BitAnd[n, #]&];
|
|
PROG
|
(Python)
from itertools import count, islice
from operator import ior
from functools import reduce
from sympy import primefactors
def A102553_gen(startvalue=1): # generator of terms >= startvalue
return filter(lambda n:n == 1 or n|reduce(ior, primefactors(n))==n, count(max(startvalue, 1)))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|