

A161170


Least integer k such that the nalmost prime count is equal to the prime count.


0




OFFSET

2,1


COMMENTS

Related to sequence A125149, but we compare the prime count to the semiprime count, then the productofthreeprimes 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 productofthreeprimes 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.


LINKS

Table of n, a(n) for n=2..8.


EXAMPLE

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.


PROG

(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
}
(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


CROSSREFS

Cf. A125149.
Sequence in context: A123358 A230390 A089832 * A281595 A097816 A323877
Adjacent sequences: A161167 A161168 A161169 * A161171 A161172 A161173


KEYWORD

hard,more,nonn


AUTHOR

Andy Martin, Jun 04 2009


EXTENSIONS

Edited example and a(8) from Donovan Johnson, Mar 10 2010


STATUS

approved



