OFFSET
1,4
COMMENTS
When for some k, a(k) = 0, a(k+1) is the number 1's (empty products) in the sequence. The number of zero terms are never counted because there are no numbers whose product of prime factors = 0.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^20, replacing a(n) = 0 with 1/2 for visibility.
Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^16, replacing a(n) = 0 with 1/2 for visibility, with a color function showing counter c = 0 in black, c = 1 in red, c = 2 in orange, .. c = 14 in magenta.
EXAMPLE
a(1) = 1, so a(2) = 1 since there is one term which is the product of no primes.
a(3) = 0 since there are no terms which are the product of one prime.
Now the count resets and a(4) = 2 since there are two empty products (a(1) = a(2) = 1).
a(5) = 1 since a(4) = 2 is the product of one prime.
a(6) = 0 since there are no terms which are the product of two primes.
The count resets again and a(7) = 3, the number of empty products.
a(8) = 2 because there are now two terms (a(4) = 2 and a(7) = 3) which are the product of one prime.
Since there are still no terms which are the product of two primes, a(9) = 0.
a(10) = 3, still the number of empty products and a(11) = 4 since there are now four prime terms. This is the first term with two prime divisors (counted with multiplicity), implying that a(12), the next count of two prime divisors must be = 1. And so on.
MATHEMATICA
nn = 120; q[_] := 0; j = 1; c = 0; q[0]++; {j}~Join~Reap[Do[If[j == 0, c = 0]; j = Sow[q[c]]; c++; If[j > 0, q[PrimeOmega[j]]++], {n, 2, nn}] ][[-1, 1]] (* Michael De Vlieger, Jun 02 2025 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
David James Sycamore, Jun 01 2025
STATUS
approved
