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 A365521 #41 Jan 20 2024 09:49:05 %S A365521 1,2,3,2,5,3,7,2,3,5,11,2,13,7,3,2,17,3,19,5,7,11,23,2,5,13,3,7,29,2, %T A365521 31,2,11,17,5,3,37,19,13,2,41,7,43,11,5,23,47,3,7,2,17,13,53,3,11,7, %U A365521 19,29,59,5,61,31,3,2,13,11,67,17,23,7,71,3,73,37,5,19 %N A365521 a(1) = 1; for n > 1, a(n) is the prime factor of n that has not appeared for the longest time in {a(1),...,a(n-2),a(n-1)}. %H A365521 Jianglin Luo, <a href="/A365521/b365521.txt">Table of n, a(n) for n = 1..10080</a> %H A365521 David A. Corneth, <a href="/A365521/a365521.gp.txt">PARI program</a> %H A365521 Jianglin Luo, <a href="https://2293.github.io/mathdemos/100001historical%20prime%20factor.html">Sagecell</a> %e A365521 a(6)=3 because 6 = 2*3 and 2=a(4) has appeared more recently than 3=a(3). %e A365521 a(12)=2 because 12 = 2^2*3 and 3=a(9) has appeared more recently than 2=a(8). %e A365521 a(30)=2 because 30 = 2*3*5 and 3=a(27) and 5=a(25) have appeared more recently than 2=a(24). %o A365521 (SageMath) %o A365521 def hpf_seq(top): %o A365521 H=[0,1,2,3] %o A365521 for n in range(4,top): %o A365521 prime_factors=[part[0] for part in list(factor(n))] %o A365521 cursor=-1 %o A365521 while len(prime_factors)>1: %o A365521 if H[cursor] in prime_factors: %o A365521 prime_factors.remove(H[cursor]) %o A365521 cursor-=1 %o A365521 hpf=prime_factors[0] %o A365521 H.append(hpf) %o A365521 return H %o A365521 (PARI) See PARI link \\ _David A. Corneth_, Sep 08 2023 %Y A365521 Cf. A088387, A006530, A034699, A088388. %K A365521 nonn,easy %O A365521 1,2 %A A365521 _Jianglin Luo_, Sep 08 2023