login
a(1) = a(2) = 1; for n > 2, a(n) is the smallest positive number such that a(n) plus the sum of all previous terms appears in the string concatenation of a(1)..a(n-1).
1

%I #12 Oct 20 2022 20:37:27

%S 1,1,9,8,79,21,79,19,574,1,87,40,2,36,30,211,593,83,83,30,128,64,184,

%T 501,148,9,280,329,203,5,185,161,3,314,391,119,150,24,556,197,195,64,

%U 105,108,8,777,207,16,302,52,147,2,111,298,53,67,66,20,105,99,37,15,85,51,183,39,45,8,14

%N a(1) = a(2) = 1; for n > 2, a(n) is the smallest positive number such that a(n) plus the sum of all previous terms appears in the string concatenation of a(1)..a(n-1).

%C It is conjectured that all numbers eventually appear. In the first 100000 terms the only fixed point is 210; it is likely no more exist.

%H Michael De Vlieger, <a href="/A357880/b357880.txt">Table of n, a(n) for n = 1..10000</a>

%H Scott R. Shannon, <a href="/A357880/a357880_1.png">Image of the first 100000 terms</a>. The green line is a(n) = n.

%e a(6) = 21 as a(1) + ... + a(5) + 21 = 98 + 21 = 119, and "119" appears in the string concatenation of a(1)..a(5) = "119879".

%t nn = 120; a[1] = a[2] = 1; s = 2; w = "11"; Do[k = 1; While[! StringContainsQ[w, ToString[k + s]], k++]; a[n] = k; s += k; w = StringJoin[w, ToString[k]], {n, 3, nn}]; Array[a, nn] (* _Michael De Vlieger_, Oct 20 2022 *)

%Y Cf. A357432, A357433, A000027, A007908, A000217, A351753, A337227.

%K nonn,base

%O 1,3

%A _Scott R. Shannon_, Oct 18 2022