This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A363159 #47 Jul 15 2023 08:48:18 %S A363159 1,2,3,2,4,3,6,5,2,6,12,5,10,3,9,2,8,3,12,24,5,15,2,10,20,3,15,30,7,2, %T A363159 12,36,5,20,40,3,18,5,25,2,14,3,21,2,16,3,24,48,5,30,60,7,14,28,3,27, %U A363159 2,18,36,72,5,35,2,20,60,120,7,21,42,5,40,80,3,30,90,7,28,56,3,33,2,22,3,36,108 %N A363159 a(1)=1. Thereafter, if a(n-1) is a novel term, a(n) is the smallest prime which does not divide a(n-1). If a(n-1) has been seen k (>1) times already then a(n) = k*a(n-1). %C A363159 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. %C A363159 On the first occasion of A007947(a(n-1)) = A002110(k-1), a(n) is the first occasion of prime(k). %H A363159 Michael De Vlieger, <a href="/A363159/b363159.txt">Table of n, a(n) for n = 1..10000</a> %H A363159 Michael De Vlieger, <a href="/A363159/a363159.png">Log log scatterplot of a(n)</a>, n = 1..2^20. %F A363159 For integer m let f(m) be the number of times m appears in the sequence. %F A363159 f(1)=1, f(p)->oo for all prime p, and for n composite the following recursion applies: %F A363159 f(n) = A001221(n) + Sum_{i=1..A321516(n)} [k_i*f(k_i)>=n], where k_i is a composite divisor of n and [] is the Iverson bracket. %e A363159 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. %e A363159 a(4)=4 since 2 has appeared twice. %e A363159 a(7) = 6, therefore a(8) = 5. %e A363159 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. %t A363159 nn = 120; c[_] := 0; a[1] = c[1] = k = 1; %t A363159 Do[If[c[j] == 0, %t A363159 c[j]++; p = 2; While[Divisible[j, p], p = NextPrime[p]]; Set[k, p], %t A363159 c[j]++; Set[k, j c[j]] ]; %t A363159 Set[{a[n], j}, {k, k}], {n, 2, nn}]; %t A363159 Array[a, nn] (* _Michael De Vlieger_, Jul 08 2023 *) %o A363159 (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 %Y A363159 Cf. A001221, A002110, A007947, A053669, A321516, A351495, A359804. %K A363159 nonn %O A363159 1,2 %A A363159 _David James Sycamore_, Jul 08 2023