OFFSET
1,2
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000
EXAMPLE
6 = 2^1 * 3^1 is included as bitwise-or of its exponents is 1 and likewise bitwise-and(1,1) = 1 and 1+1 = A001222(6) = 2, the number of the prime factors of 6 when counted with multiplicity.
12 = 2^2 * 3^1 is included as bitwise-or of its exponents ("10" and "01" in binary) is 3 ("11"), bitwise-and(1,2) = 0 and 3+0 = A001222(12).
60 = 2^2 * 3^1 * 5^1 is NOT included as bitwise-or(2,1,1) = 3, bitwise-and(2,1,1) = 0 and 3+0 < 4 = A001222(60).
MATHEMATICA
{1}~Join~Select[Range@ 144, Function[n, PrimeOmega@ n == BitAnd @@ # + BitOr @@ # &@ Map[Last, FactorInteger@ n]]] (* Michael De Vlieger, Feb 07 2016 *)
PROG
(Scheme, with Antti Karttunen's IntSeq-library)
(PARI) is(n)=if(n>1, my(f=factor(n)[, 2]); fold(bitand, f) + fold(bitor, f) == vecsum(f), 1) \\ Charles R Greathouse IV, Aug 04 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 03 2016
EXTENSIONS
Erroneous claim corrected by Antti Karttunen, Feb 07 2016
STATUS
approved