%I #17 Mar 11 2023 10:51:33
%S 1,2,3,4,5,7,9,11,15,16,19,20,23,24,26,31,33,34,39,41,44,47,48,49,53,
%T 63,67,68,69,74,79,83,89,95,97,98,99,104,107,127,132,135,137,139,144,
%U 146,149,152,159,160,164,167,179,191,194,195,197,199,209,215,242,255
%N Numbers n for which the sum of the binary digits (or count of 1-bits) equals the sum of the prime exponents of n+1 (or the factor-count of n+1).
%C This sequence becomes rare for large n: 15 values between 100000 and 101024 and none between 1000000 and 1001024.
%H Harry J. Smith, <a href="/A064548/b064548.txt">Table of n, a(n) for n = 1..1000</a>
%F n such that A000120(n) = A001222(n+1). - _Franklin T. Adams-Watters_, Aug 17 2012
%e 8 is absent since 8 in binary is (1000) with sum=1, while (8+1) has 2 factors.
%t Select[ Range[ 1024 ], DigitCount[ #, 2, 1 ]===(Plus@@(Last/@FactorInteger[ #+1 ]))& ]
%t Select[Range[300],DigitCount[#,2,1]==PrimeOmega[#+1]&] (* _Harvey P. Dale_, Mar 11 2023 *)
%o (PARI) SumD(x)= { local(s); s=0; while (x>9, s+=x-10*(x\10); x\=10); return(s + x) } baseE(x, b)= { local(d,e,f); e=0; f=1; while (x>0, d=x-b*(x\b); x\=b; e+=d*f; f*=10); return(e) } { n=0; for (m=1, 10^9, s=SumD(baseE(m, 2)); f=factor(m + 1)~; e=0; for (i=1, length(f), e+=f[2, i]; if (e>s, break)); if (s==e, write("b064548.txt", n++, " ", m); if (n==1000, break)) ) } \\ _Harry J. Smith_, Sep 18 2009
%Y Cf. A000120, A001222, A058061, A064547.
%K nonn
%O 1,2
%A _Wouter Meeussen_, Oct 09 2001