login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Numbers n such that the largest power of 2 dividing n equals 2^omega(n).
2

%I #25 Jul 05 2022 23:30:18

%S 1,2,12,20,28,36,44,52,68,76,92,100,108,116,120,124,148,164,168,172,

%T 188,196,212,236,244,264,268,280,284,292,312,316,324,332,356,360,388,

%U 404,408,412,428,436,440,452,456,484,500,504,508,520,524,548,552,556

%N Numbers n such that the largest power of 2 dividing n equals 2^omega(n).

%C That is, numbers such that A001221(n) is equal to A007814(n).

%C omega(n) = A001221(n) is the number of distinct primes dividing n.

%C And A007814(n) is the exponent of the highest power of 2 dividing n.

%H G. C. Greubel, <a href="/A023534/b023534.txt">Table of n, a(n) for n = 1..1000</a>

%e omega(12)=2 and 4=2^2 is the largest power of 2 dividing 12, hence 12 is in the sequence.

%t Select[Range[600],IntegerExponent[#,2]==PrimeNu[#]&] (* _Harvey P. Dale_, Jun 26 2011 *)

%o (PARI) isok(n) = omega(n) == valuation(n, 2); \\ _Michel Marcus_, Apr 16 2015

%o (Python)

%o from itertools import count, islice

%o from sympy.ntheory.factor_ import primenu

%o def A023534_gen(startvalue=1): # generator of terms

%o return filter(lambda n:(~n & n-1).bit_length() == primenu(n),count(max(startvalue,1)))

%o A023534_list = list(islice(A023534_gen(),30)) # _Chai Wah Wu_, Jul 05 2022

%Y Cf. A039700, A001221 (omega), A007814 (2-adic valuation).

%K nonn

%O 1,2

%A _Benoit Cloitre_, Sep 04 2002