cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A165256 Numbers whose number of distinct prime factors equals the number of digits in the number.

This page as a plain text file.
%I A165256 #35 Apr 14 2023 02:27:40
%S A165256 2,3,4,5,7,8,9,10,12,14,15,18,20,21,22,24,26,28,33,34,35,36,38,39,40,
%T A165256 44,45,46,48,50,51,52,54,55,56,57,58,62,63,65,68,69,72,74,75,76,77,80,
%U A165256 82,85,86,87,88,91,92,93,94,95,96,98,99,102,105,110,114,120,126,130,132
%N A165256 Numbers whose number of distinct prime factors equals the number of digits in the number.
%C A165256 Is this sequence finite? If the answer is yes, is there any estimate for the number of terms of this sequence? - _Parthasarathy Nambi_, Nov 16 2009
%C A165256 This sequence is finite since there are only finitely many primes less than 10. - _Charles R Greathouse IV_, Feb 04 2013
%C A165256 Specifically, all terms have <= 10 digits since primorial(k) = A002110(k) has > k digits for k > 10. - _Michael S. Branicky_, Apr 13 2023
%H A165256 Charles R Greathouse IV, <a href="/A165256/b165256.txt">Table of n, a(n) for n = 1..7812</a> (complete sequence)
%H A165256 Michael S. Branicky, <a href="/A165256/a165256.py.txt">Python program</a>
%e A165256 The number of distinct prime factors of 4 is 1, which is the same as the number of digits in 4, so 4 is in the sequence.
%e A165256 The number of distinct prime factors of 21 is 2, which is the same as the number of digits in 21, so 21 is in the sequence.
%e A165256 However, 25 is NOT in the sequence because the number of distinct prime factors of 25 is 1, which does not match the number of digits in 25.
%p A165256 omega := proc(n) nops(numtheory[factorset](n)) ; end: A055642 := proc(n) max(1, ilog10(n)+1) ; end: A165256 := proc(n) option remember; local a; if n = 1 then 2; else for a from procname(n-1)+1 do if A055642(a) = omega(a) then RETURN(a) ; fi; od: fi; end: seq(A165256(n),n=1..120) ; # _R. J. Mathar_, Sep 17 2009
%t A165256 Select[Range[200], IntegerLength[#] == Length[FactorInteger[#]] &]  (* _Harvey P. Dale_, Mar 20 2011 *)
%o A165256 (PARI) is(n)=#Str(n)==omega(n) \\ _Charles R Greathouse IV_, Feb 04 2013
%o A165256 (Python) # see link for alternate version producing full sequence instantly
%o A165256 from sympy import primefactors
%o A165256 def ok(n): return len(primefactors(n)) == len(str(n))
%o A165256 print([k for k in range(10**5) if ok(k)]) # _Michael S. Branicky_, Apr 13 2023
%Y A165256 Cf. A001221, A055642, A115024, A002110.
%K A165256 base,nonn,fini,full
%O A165256 1,1
%A A165256 _Parthasarathy Nambi_, Sep 11 2009
%E A165256 Extended by _R. J. Mathar_, Sep 17 2009