

A362061


a(1) = 1; for n > 1, a(n) is number of terms in the first n1 terms of the sequence that have the same number of distinct prime factors as a(n1).


2



1, 1, 2, 1, 3, 2, 3, 4, 5, 6, 1, 4, 7, 8, 9, 10, 2, 11, 12, 3, 13, 14, 4, 15, 5, 16, 17, 18, 6, 7, 19, 20, 8, 21, 9, 22, 10, 11, 23, 24, 12, 13, 25, 26, 14, 15, 16, 27, 28, 17, 29, 30, 1, 5, 31, 32, 33, 18, 19, 34, 20, 21, 22, 23, 35, 24, 25, 36, 26, 27, 37, 38, 28, 29, 39, 30, 2, 40, 31, 41, 42
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,3


COMMENTS

After 5 million terms the most common numbers for the number of distinct prime factors of the terms are 3, 2, 4, 1, and 5, although it is likely these change as n increases.
See A362062 for the indices where a term with k distinct prime factors first appears.


LINKS

Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^20, with a color function representing omega(a(n1)), where black = 0, red = 1, yellow = 2, ..., magenta = 6.


EXAMPLE

a(9) = 5 as the number of distinct prime factors of a(8) = A001221(a(8)) = A001221(4) = 1, and there are five previous terms, a(3), a(5) a(6), a(7) and a(8), that have one prime factor.
a(11) = 1 as the number of distinct prime factors of a(10) = A001221(a(10)) = A001221(6) = 2, and there is only one term, a(10), that has two prime factors.


MATHEMATICA

nn = 120; c[_] = 0; j = a[1] = c[0] = 1; m = 0; Do[Set[k, c[m]]; (Set[{a[n], j, m}, {k, k, #}]; c[#]++) &[PrimeNu[k]], {n, 2, nn}]; Array[a, nn] (* Michael De Vlieger, Apr 06 2023 *)


PROG

(Python)
from itertools import islice
from sympy import primefactors
from collections import Counter
def A362061gen(): # generator of terms
an, c, d = 1, Counter(), dict()
while True:
yield an
dpf = d[an] if an in d else len(primefactors(an))
c[dpf] += 1
an = c[dpf]


CROSSREFS



KEYWORD

nonn


AUTHOR



STATUS

approved



