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.

A161170 Least integer k such that the n-almost prime count is equal to the prime count.

Original entry on oeis.org

10, 125, 1809, 37820, 2722768, 1037849736, 4204496515890, 476649763963226416
Offset: 2

Views

Author

Andy Martin, Jun 04 2009

Keywords

Comments

Related to sequence A125149, but we compare the prime count to the semiprime count, then the product-of-three-primes count, and so on.
We start with a the number two, and a prime count of 1.
Then the prime count and semiprime count are first identical when k = 10, the prime count is 4 ({2, 3, 5, 7}) and the semiprime count is also 4 ({4, 6, 9, 10}).
Next, when k = 125 the prime count of 30 and product-of-three-primes count of 30 are first identical.
Based on the write up for A125149 and examination of the factor counts as k increases, we believe this sequence is infinite, but have not proved this.

Examples

			a(2) = 10 since there are now 4 primes ({2, 3, 5, 7}) and 4 semiprimes ({4, 6, 9, 10}) <= 10.
a(3) = 125 with 30 primes and 30 products of 3 primes.
a(4) = 1809 with 279 primes and 279 products of 4 primes.
a(5) = 37820 with 4000 primes and 4000 products of 5 primes.
a(6) = 2722768 with 198183 primes and 198183 products of 6 primes.
a(7) = 1037849736 with 52672391 primes and 52672391 products of 7 primes.
a(8) = 4204496515890 with 150007470826 primes and 150007470826 products of 8 primes.
a(9) = 476649763963226416 with 12012658440940682 primes and 12012658440940682 products of 9 primes.
		

Crossrefs

Cf. A125149.

Programs

  • Perl
    use ntheory ":all"; my($k,@S)=(0,map{0}1..20); forfactored { $S[@]++; while ($S[1] == $S[$k]) { print "$k $\n" if $k>1; $k++; } } 3e6; # Dana Jacobsen, Jan 18 2019
  • Ruby
    # A slow program to generate sequence
    # Faster C code is available by request
    # Tallies number of primes, semiprimes, trieneprimes ...
    tally = Hash.new { |h,k| h[k] = 0}
    # Returns number of factors of num
    def factors(num)
    (2..(Math.sqrt(num).to_i)).each{ |i|
    return factors(num/i) + 1 if num % i == 0
    }
    1
    end
    # Testing number of primes against composites with num_factors
    num_factors = 2
    2.upto( 1.0/0.0 ) { |i|
    tally[factors(i)] +=1
    if tally[1] == tally[num_factors]
    puts "k: #{i} Primes: #{tally[1]} Composites with #{num_factors} factors: #{tally[num_factors]}"
    num_factors += 1
    end
    }
    

Extensions

Edited example and a(8) from Donovan Johnson, Mar 10 2010
a(9) from Henri Lifchitz, Mar 17 2025