cp's OEIS Frontend

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.

A350151 Variation of Van Eck's sequence A181391: a(1) = 0; a(n+1) is the positive offset from the end of the string concatenating a(1) through a(n-1) to the first appearance of a(n). a(n+1) = 0 if a(n) does not appear in the string.

This page as a plain text file.
%I A350151 #10 Jan 07 2022 15:54:01
%S A350151 0,0,1,0,2,0,2,2,1,6,0,5,0,2,6,5,4,0,5,3,0,3,2,9,0,4,9,3,6,14,0,7,0,2,
%T A350151 12,0,4,8,0,3,14,13,0,6,19,0,4,8,13,9,6,9,2,22,53,43,0,15,0,3,5,3,2,
%U A350151 12,38,0,9,21,7,49,57,0,9,4,6,33,0,6,4,6,2
%N A350151 Variation of Van Eck's sequence A181391: a(1) = 0; a(n+1) is the positive offset from the end of the string concatenating a(1) through a(n-1) to the first appearance of a(n). a(n+1) = 0 if a(n) does not appear in the string.
%C A350151 This sequence and A181391 differ starting at n = 32.
%C A350151 It seems that a(n)/(n*log(n)) <= 1/(3*log(3)) and lim sup a(n)/(n*log(n)) = 0.24 approximately.
%e A350151 a(2) = 0 as a(1) = 0, which does not appear before a(1).
%e A350151 a(15) = 6 as a(14) = 2, which first appears 6th digits back from the end of the string, '0010202216050', the decimal concatenation of a(1) through a(13).
%e A350151 a(42) = 13 as a(41) = 14, which first appears 13 digits back from the end of the string, '001020221605026540530329049361407021204803', the decimal concatenation of a(1) through a(40).
%t A350151 a[1]=0;a[n_]:=a[n]=Block[{c=""<>ToString/@Most[s=Array[a,n-1]]},Check[Max[StringLength@c-Last@StringPosition[c,ToString@Last@s]]+1,0]];Array[a,81] (* _Giorgos Kalogeropoulos_, Dec 17 2021 *)
%o A350151 (Python)
%o A350151 a1 = '0'; print(a1, end =', '); S = a2 = ''
%o A350151 for n in range(2, 100):
%o A350151     p = S.rfind(a1); a = str(len(S) - p) if p != -1 else '0'
%o A350151     print(a, end = ", "); S += a1; a2 = a1; a1 = a
%Y A350151 Cf. A181391, A333359.
%K A350151 nonn,base
%O A350151 1,5
%A A350151 _Ya-Ping Lu_, Dec 16 2021