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”).
%I #43 Feb 26 2024 01:28:28
%S 0,0,1,2,3,0,4,5,6,1,7,2,8,3,4,9,10,5,11,6,7,8,12,9,13,10,14,11,15,0,
%T 16,17,12,13,14,15,18,16,17,18,19,1,20,19,20,21,21,22,22,23,24,25,23,
%U 26,27,28,29,30,24,2,25,31,32,26,33,3,27,34,35,4,28,36,29,37,38,39,40,5,30,41
%N Number of integers less than n with the same number of distinct prime factors as n.
%H Robert Israel, <a href="/A334655/b334655.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = |{j < n : omega(j) = omega(n)}|.
%F a(n) = A067003(n) - 1.
%e a(12) = 2 because omega(12) = 2 and also omega(6) = omega(10) = 2.
%p R:= NULL:
%p for n from 1 to 100 do
%p w:= nops(numtheory:-factorset(n));
%p if assigned(V[w]) then V[w]:= V[w]+1 else V[w]:= 1 fi;
%p R:= R, V[w]-1
%p od:
%p R; # _Robert Israel_, Feb 25 2024
%t Table[Length[Select[Range[n - 1], PrimeNu[#] == PrimeNu[n] &]], {n, 80}]
%o (PARI) a(n)={my(t=omega(n)); sum(k=1, n-1, omega(k)==t)} \\ _Andrew Howroyd_, Oct 31 2020
%Y Cf. A001221, A002110 (positions of 0's), A047983, A067003, A067004, A322837, A322841, A335097.
%K nonn
%O 1,4
%A _Ilya Gutkovskiy_, Oct 31 2020