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 A357839 #12 Nov 27 2022 12:13:06 %S A357839 0,1,2,2,3,3,4,4,3,2,5,4,6,2,5,4,7,6,8,5,7,2,9,8,5,2,9,7,10,10,11,8, %T A357839 11,2,7,9,12,2,3,10,13,7,14,11,9,2,15,12,7,10,3,13,16,9,11,14,3,2,17, %U A357839 15,18,2,9,16,13,11,19,17,3,14,20,18,21,2,15,19,11 %N A357839 a(n) is the greatest divisor > 1 of n which has already been listed, otherwise a(n) is the smallest number not yet listed; a(1) = 0. %C A357839 When n is prime, a(n) is the prime index (A000720). %H A357839 Samuel Harkness, <a href="/A357839/b357839.txt">Table of n, a(n) for n = 1..10000</a> %H A357839 Samuel Harkness, <a href="/A357839/a357839.jpg">Log-log Scatterplot of the first 3000000 terms</a> %H A357839 Samuel Harkness, <a href="/A357839/a357839_1.jpg">Scatterplot of the first 3000000 terms</a> %e A357839 For n = 6 the set of all divisors of 6 greater than 1 is {2, 3, 6}. Also, the set of all a(n < 6) is {0, 1, 2, 3}. The greatest divisor of 6 (excluding 1) that has been listed is 3, so a(6) = 3. %t A357839 a = 0; A = {a}; Do[s = Drop[Reverse[Divisors[n]], 1]; s = Drop[s, -1]; If[Length[s] >= 1, Do[If[MemberQ[A, Part[s, d]], AppendTo[A, Part[s, d]]; Break[]], {d, 1, Length[s]}], a++; AppendTo[A, a]], {n, 2, 77}] Print[A] %o A357839 (PARI) first(n)=my(v=vector(n),m); forfactored(k=2,n, v[k[1]]=if(vecsum(k[2][,2])==1, m++, my(t); fordiv(k,d, if(d<=m, t=d)); t)); v \\ _Charles R Greathouse IV_, Oct 14 2022 %Y A357839 Cf. A008336, A008344, A051352. %K A357839 nonn,easy %O A357839 1,3 %A A357839 _Samuel Harkness_, Oct 14 2022