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.

Original entry on oeis.org

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, 44, 45, 46, 48, 50, 51, 52, 54, 55, 56, 57, 58, 62, 63, 65, 68, 69, 72, 74, 75, 76, 77, 80, 82, 85, 86, 87, 88, 91, 92, 93, 94, 95, 96, 98, 99, 102, 105, 110, 114, 120, 126, 130, 132
Offset: 1

Views

Author

Parthasarathy Nambi, Sep 11 2009

Keywords

Comments

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
This sequence is finite since there are only finitely many primes less than 10. - Charles R Greathouse IV, Feb 04 2013
Specifically, all terms have <= 10 digits since primorial(k) = A002110(k) has > k digits for k > 10. - Michael S. Branicky, Apr 13 2023

Examples

			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.
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.
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.
		

Crossrefs

Programs

  • Maple
    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
  • Mathematica
    Select[Range[200], IntegerLength[#] == Length[FactorInteger[#]] &]  (* Harvey P. Dale, Mar 20 2011 *)
  • PARI
    is(n)=#Str(n)==omega(n) \\ Charles R Greathouse IV, Feb 04 2013
    
  • Python
    # see link for alternate version producing full sequence instantly
    from sympy import primefactors
    def ok(n): return len(primefactors(n)) == len(str(n))
    print([k for k in range(10**5) if ok(k)]) # Michael S. Branicky, Apr 13 2023

Extensions

Extended by R. J. Mathar, Sep 17 2009