OFFSET
1,1
COMMENTS
The number of prime factors (counted with multiplicity) of n is bigomega(n) = A001222(n).
LINKS
Zak Seidov, Table of n, a(n) for n = 1..10000
EXAMPLE
a(6)=3 because 6, 7, 8 and 9 have, respectively, 2, 1, 3 and 2 prime factors; the first 3 of these are distinct.
MATHEMATICA
bigomega[n_] := Plus@@Last/@FactorInteger[n]; a[n_] := For[k=1; s={bigomega[n]}, True, k++, If[MemberQ[s, z=bigomega[n+k]], Return[k], AppendTo[s, z]]]
ss={}; Do[s={PrimeOmega[n]}; k=1; While[FreeQ[s, (b=PrimeOmega[n+k])], s=AppendTo[s, b]; k++]; ss=AppendTo[ss, k], {n, 103}]; (* Zak Seidov, Nov 09 2015 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Dean Hickerson, Mar 05 2002
STATUS
approved