login
Numbers that have the same number of prime factors, counted with multiplicity, as there are runs in their base-10 representation.
3

%I #15 Jan 09 2025 19:17:22

%S 2,3,5,7,10,11,14,15,21,25,26,34,35,38,39,46,49,51,57,58,62,65,69,74,

%T 82,85,86,87,91,93,94,95,102,105,115,118,119,122,124,125,130,133,138,

%U 147,148,153,154,155,164,165,166,170,171,172,174,175,177,182,186,190,195,207,212,221,226,230,231

%N Numbers that have the same number of prime factors, counted with multiplicity, as there are runs in their base-10 representation.

%C Numbers k such that A001222(k) = A043562(k).

%H Robert Israel, <a href="/A379929/b379929.txt">Table of n, a(n) for n = 1..10000</a>

%e a(5) = 10 is a term because 10 has two runs (1 and 0) and two prime factors, 2 and 5.

%p filter:= proc(n) local L; L:= convert(n,base,10); nops(L) - numboccur(0, L[2..-1]-L[1..-2]) = numtheory:-bigomega(n) end proc:

%p select(filter, [$1..1000]);

%t A379929Q[n_] := PrimeOmega[n] == Length[Split[IntegerDigits[n]]];

%t Select[Range[300], A379929Q] (* _Paolo Xausa_, Jan 08 2025 *)

%o (Python)

%o from sympy import primeomega

%o def ok(n): return primeomega(n) == len(s:=str(n)) - sum(1 for i in range(1, len(s)) if s[i-1] == s[i])

%o print([k for k in range(1, 232) if ok(k)]) # _Michael S. Branicky_, Jan 08 2025

%Y Cf. A001222, A043562, A379930, A379931.

%K nonn,base

%O 1,1

%A _Robert Israel_, Jan 06 2025