OFFSET
1,3
COMMENTS
A nonprime term arises either following a multiple (>1) of a prior term, or following a novel term m such that A078709(m) is a nonprime number. A prime term arises either as a multiple of 1 (first occurrences of 2,3,5), or following a novel term m such that A078709(m) is a prime. Let C(m) be the cardinality of m in the sequence (starting 6,5,10,5,8,8,6,13,8,6,8,9,...).
Conjecture: C(m) = A125057(m) + k, where k is the number of divisors d of m such that 1 < d <= C(m/d). The cardinality of m due to occurrences of novel terms is A125057(m), whereas the cardinality due to repeat terms is counted by k, and all of the latter terms occur prior to any of the former. (Note comments in A125057, A126888, A125056, concerning definitions of those sequences.)
EXAMPLE
a(8)=1, the 5th occurrence of 1, so the next term a(9)=5.
a(43)=32, a first occurrence, so a(44)=A078709(32)=5.
a(33)=36 (consequence of two occurrences of 18), and 36 has not occurred before, so a(34)=A078709(36)=4.
C(12)=9 because A125057(12)=6, and there are 3 occurrences of 12 which are consequent to repeat terms (2 terms 6, 4 terms 3, and 3 terms 4).
Alternatively, 12 has 5 divisors >1, of which 3 (d=2,3,4) satisfy d <= C(12/d), therefore k=3 and C(12) = A125057(12) + 3 = 6 + 3 = 9.
MATHEMATICA
nn = 120; c[_] = 0; s = {1}; Table[(Set[a[i], #]; c[#]++) &@ s[[i]], {i, Length[s]}]; Do[If[c[#] == 1, Set[k, Floor[#/DivisorSigma[0, #]]], Set[k, c[#] #]] &@ a[i - 1]; a[i] = k; c[k]++, {i, Length[s] + 1, nn}]; Array[a, nn] (* Michael De Vlieger, May 14 2022 *)
PROG
(PARI) f(n) = n\numdiv(n); \\ A078709
lista(nn) = {my(v=vector(nn), k); v[1] = 1; for (n=2, nn, if ((k=#select(x->(x==v[n-1]), Vec(v, n-1))) > 1, v[n] = k*v[n-1], v[n] = f(v[n-1])); ); v; } \\ Michel Marcus, May 16 2022
(Python)
from itertools import islice
from sympy import divisor_count
def A353960_gen(): # generator of terms
adict, a = {}, 1
yield a
while True:
if a in adict:
adict[a] += 1
a *= adict[a]
else:
adict[a] = 1
a //= divisor_count(a)
yield a
CROSSREFS
KEYWORD
nonn
AUTHOR
David James Sycamore, May 12 2022
EXTENSIONS
More terms from Michel Marcus, May 16 2022
STATUS
approved