OFFSET
1,2
COMMENTS
It follows from the definition that the sequence is infinite. Every number appears multiple times according to its prime factorization. All primes p appear infinitely many times, prime powers p^k (k>1) appear once only, all squarefree semiprimes appear twice, and so on.
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.
FORMULA
EXAMPLE
a(2)=2 since 1 is a novel term and 2 is the least prime which does not divide 1, a(3)=3 since 3 is the smallest prime which does not divide 2.
a(4)=4 since 2 has appeared twice.
a(7) = 6, therefore a(8) = 5.
f(30) = A001221(30) + 1 since f(15)=2 and 2*15=30. No other divisor d of 30 has the property d*f(d) >= 30 thus f(30)=3+1=4.
MATHEMATICA
nn = 120; c[_] := 0; a[1] = c[1] = k = 1;
Do[If[c[j] == 0,
c[j]++; p = 2; While[Divisible[j, p], p = NextPrime[p]]; Set[k, p],
c[j]++; Set[k, j c[j]] ];
Set[{a[n], j}, {k, k}], {n, 2, nn}];
Array[a, nn] (* Michael De Vlieger, Jul 08 2023 *)
PROG
(PARI) lista(nn) = my(c, p, v=vector(nn)); v[1]=1; for(k=2, nn, if(c=sum(i=1, k-2, v[i]==v[k-1]), v[k]=(c+1)*v[k-1], p=2; while(v[k-1]%p==0, p=nextprime(p+1)); v[k]=p)); v \\ Jinyuan Wang, Jul 11 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
David James Sycamore, Jul 08 2023
STATUS
approved