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 A171911 #30 Aug 29 2020 17:25:59 %S A171911 1,0,0,1,3,0,3,2,0,3,3,1,8,0,5,0,2,9,0,3,9,3,2,6,0,6,2,4,0,4,2,4,2,2, %T A171911 1,23,0,8,25,0,3,19,0,3,3,1,11,0,5,34,0,3,7,0,3,3,1,11,11,1,3,5,13,0, %U A171911 10,0,2,33,0,3,9,50,0,4,42,0,3,7,25,40,0,5,20,0,3,8,48,0,4,15 %N A171911 Van Eck's sequence (cf. A181391), but starting with a(1) = 1. %C A171911 After the initial value, the sequence is extended by a(n+1) = min { k > 0: a(n-k) = a(n) } or 0 if no such k exists, i.e., if a(n) did not appear earlier. %H A171911 Chai Wah Wu, <a href="/A171911/b171911.txt">Table of n, a(n) for n = 1..10001</a> %t A171911 t = {1}; %t A171911 Do[ %t A171911 d = Quiet[Check[Position[t, Last[t]][[-2]][[1]], 0], Part::partw]; %t A171911 If[d == 0, x = 0, x = Length[t] - d]; %t A171911 AppendTo[t, x], 100] %t A171911 t (* _Horst H. Manninger_, Aug 03 2020 *) %o A171911 (Python) %o A171911 A171911_list, l = [1, 0], 0 %o A171911 for n in range(1, 10**4): %o A171911 for m in range(n-1, -1, -1): %o A171911 if A171911_list[m] == l: %o A171911 l = n-m %o A171911 break %o A171911 else: # break did not occur %o A171911 l = 0 %o A171911 A171911_list.append(l) # _Chai Wah Wu_, Jan 02 2015 %o A171911 (PARI) A171911_vec(N,a=1,i=Map())={vector(N,n,a=if(n>1,iferr(n-mapget(i,a),E,0)+mapput(i,a,n),a))} \\ _M. F. Hasler_, Jun 11 2019 %Y A171911 Cf. A181391, A171912, A171913, A171914, A171915, A171916, A171917, A171918 (same but starting with 0, 2, ..., 8). %K A171911 nonn %O A171911 1,5 %A A171911 _N. J. A. Sloane_, Oct 22 2010 %E A171911 Edited by _M. F. Hasler_, Jun 11 2019