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 A309107 #12 Jul 27 2019 16:52:46 %S A309107 0,0,0,2,0,2,2,3,0,4,0,2,5,0,3,7,0,3,3,4,10,0,5,10,3,6,0,5,5,6,4,11,0, %T A309107 6,4,4,5,8,0,6,6,7,26,0,5,8,8,9,0,5,5,6,11,21,0,6,4,21,4,2,48,0,7,21, %U A309107 6,9,18,0,6,4,11,18,5,22,0,7,13,0,3,54,0,3,3,4,14,0,5,14,3,6,21,27,0,7,18,23,0,4,14,11 %N A309107 A member of a family of generalizations of van Eck's sequence as defined below. %C A309107 For n >= 1, if there exists an m < n-1 such that a(m) = a(n), take the largest such m and set a(n+1) = n-m; otherwise a(n+1) = 0. Start with a(1) = a(2) = 0. %C A309107 T: let 0 <= k < l. For n > k, if there exists an m <= n-l such that a(m) = a(n-k), take the largest such m and set a(n+1) = n-m; otherwise a(n+1) = 0. Start with a(1) = ... = a(l) = 0. Setting k = 0, l = 1 produces van Eck's sequence A181391; setting k = 0, l = 2 produces this sequence. %o A309107 (MATLAB) %o A309107 function VEg = VE_generalized(N, k, l) %o A309107 assert(l > k); %o A309107 VEg = zeros(1, l); %o A309107 for n = l:(N - 1) %o A309107 prev = VEg(n - k); %o A309107 VEg(n + 1) = 0; %o A309107 for j = (n - l):-1:1 %o A309107 if VEg(j) == prev %o A309107 VEg(n + 1) = n - j; %o A309107 break %o A309107 end %o A309107 end %o A309107 end %o A309107 end %Y A309107 Cf. A181391. %K A309107 easy,nonn %O A309107 1,4 %A A309107 _Christian Schroeder_, Jul 12 2019