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 A330332 #19 Nov 09 2020 02:56:38 %S A330332 0,1,2,3,3,5,5,6,5,7,5,9,6,7,5,9,9,11,7,7,9,12,9,11,8,8,6,7,10,9,12,9, %T A330332 16,10,10,7,12,12,14,9,13,10,13,8,9,14,14,15,7,11,11,15,10,11,12,15, %U A330332 13,11,12,15,16,12,13,13,17,11,13,14,17,12,14,15,18,11,14,15,20,13,14,15,21,15 %N A330332 a(n) = (number of times a(n-1) has already appeared) + (number of times a(n-2) has already appeared) + (number of times a(n-3) has already appeared), starting with a(n) = n for n<3. %C A330332 Generalizes A316774, which looks at the frequencies of the two previous terms. Here we look at three previous terms. %C A330332 If we look at just one previous term, we get 0, 1, 1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 1, 8, ..., which is A133622 prefixed by 0, 1, or A152271 with its initial 1 changed to 0. %H A330332 N. J. A. Sloane, <a href="/A330332/b330332.txt">Table of n, a(n) for n = 0..10000</a> %H A330332 Rémy Sigrist, <a href="/A330332/a330332.png">Density plot of the first 2^22 terms</a> %p A330332 b:= proc() 0 end: %p A330332 a:= proc(n) option remember; local t; %p A330332 t:= `if`(n<3, n, b(a(n-1))+b(a(n-2))+b(a(n-3))); %p A330332 b(t):= b(t)+1; t %p A330332 end: %p A330332 [seq(a(n), n=0..200)]; # Following _Alois P. Heinz_'s program for A316774 %t A330332 b[_] = 0; %t A330332 a[n_] := a[n] = Module[{t}, t = If[n<3, n, b[a[n-1]] + b[a[n-2]] + b[a[n-3]]]; b[t]++; t]; %t A330332 a /@ Range[0, 200] (* _Jean-François Alcover_, Nov 09 2020, after Maple *) %Y A330332 Cf. A316774, A133622, A152271. %K A330332 nonn,look %O A330332 0,3 %A A330332 _N. J. A. Sloane_, Dec 14 2019