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 A363193 #31 May 24 2023 19:55:04 %S A363193 1,1,2,2,1,3,2,1,4,1,5,3,5,1,6,5,2,3,3,4,4,3,2,5,2,4,5,5,4,4,5,5,6,6, %T A363193 5,7,6,8,7,2,2,7,1,7,1,8,2,2,9,8,7,8,8,2,5,5,4,11,10,3,1,9,11,5,6,6,9, %U A363193 1,10,6,5,3,7,3,7,2,7,13,6,8,6,12,13,13,7,8 %N A363193 a(1)=1, and thereafter a(n) = number of occurrences of a(k) among terms a(1..k), where k = n-a(n-1). %H A363193 Neal Gersh Tolunsky, <a href="/A363193/b363193.txt">Table of n, a(n) for n = 1..10000</a> %H A363193 Neal Gersh Tolunsky, <a href="/A363193/a363193.png">Scatterplot of first 30000 terms</a> %H A363193 Neal Gersh Tolunsky, <a href="/A363193/a363193_2.png">Scatterplot of first 100000 terms</a> %e A363193 For n=5, a(5) is the number of times a(5 - a(5-1)) = a(5 - a(4)) = a(3) = 2 has occurred in the sequence among a(1..3). It has occurred 1 time up to that point, so a(5)=1. %o A363193 (Python) %o A363193 from bisect import bisect %o A363193 from itertools import count, islice %o A363193 def agen(): # generator of terms %o A363193 an, a, locs = 1, [None, 1], {1: [1]} %o A363193 yield 1 %o A363193 for n in count(2): %o A363193 k = n-an %o A363193 an = bisect(locs[a[k]], k) # sum(1 for i in locs[a[k]] if i <= k) %o A363193 a.append(an) %o A363193 if an not in locs: locs[an] = [] %o A363193 locs[an].append(n) %o A363193 yield an %o A363193 print(list(islice(agen(), 86))) # _Michael S. Branicky_, May 23 2023 %Y A363193 Cf. A354971. %K A363193 nonn,easy %O A363193 1,3 %A A363193 _Neal Gersh Tolunsky_, May 20 2023