%I #87 Dec 21 2024 17:38:05
%S 11,112,1124,11248,2486,4860,486018,48601827,4860182736,8601827365,
%T 860182736546,86018273654656,8601827365465667,601273654656670,
%U -1273545704,-127354570438,-12735457043849,-1273545704384962,1273545743849627,127354574384962777,273545743849627779
%N The sum-and-erase sequence starting at 11: a(0) = 11; for n>=1, let m = a(n-1), and if m < 0, change m to an improper decimal "number" by replacing the minus sign by a single leading zero; then a(n) = A359142(m).
%C Although this entry was only created in January, 2023, the problem had already been extensively studied in 2022.
%C Comment from _Michael S. Branicky_, Jul 26 2022: (Start)
%C Starting at 11, this first reaches 0 at step 1399141.
%C The longest string encountered has length 222:
%C 444444414144444454144444145454455155154545515454564756517555545657676664\
%C 465677675961617616416561527541551562575592651853254255356658359962263264\
%C 365667368971272273374676377982812823836853869892911922935952968991101010\
%C 121016.
%C (End)
%C It is conjectured that every starting number will eventually enter a cycle or reach 0 (see A359142 for small examples).
%C The first nontrivial cycle has length 583792 and the smallest number in it is 3374 (see the "Cycles in ..." Havermann link).
%C There is no b-file, but instead there is an a-file from _Hans Havermann_ giving the sequence in full in b-file format, from a(0) to a(1399141). Beware, this is a 106.5 MB file. - _N. J. A. Sloane_, Feb 01 2023
%C From _Michael S. Branicky_, Sep 06 2023: (Start)
%C There are additional cycles with lengths
%C - 20173, containing 34674044445,
%C - 46, containing 9982228989928229222222829202026260298265278295291026. (End)
%H Eric Angelini, <a href="https://cinquantesignes.blogspot.com/2022/07/does-this-iteration-end-sum-and-erase.html?m=1">Does this iteration end? (Sum and erase)</a>, Personal blog "Cinquante Signes", blogspot.com, Jul 26 2022.
%H Eric Angelini, <a href="/A359142/a359142.pdf">Does this iteration end? (Sum and erase)</a>, Personal blog "Cinquante Signes", blogspot.com, Jul 26 2022. [Cached copy, pdf file, with permission]
%H Michael S. Branicky, <a href="/A359143/a359143.py.txt">Python program for the sum-and-erase sequence</a>
%H Jean-Paul Delahaye, <a href="https://www.pourlascience.fr/sr/logique-calcul/des-suites-a-la-dynamique-insaisissable-25335.php">Des suites à la dynamique insaisissable</a>, Pour la Science #549, July 2023, pp. 80-85. (Link requires a subscription.)
%H Hans Havermann, <a href="/A359143/a359143_1.txt">Table of n, a(n) for n = 0..1399141</a> [Beware, this is a 106.5 MB file.]
%H Hans Havermann, <a href="https://gladhoboexpress.blogspot.com/2022/07/cycles-in-eric-angelinis-sum-and-erase.html">Cycles in Éric Angelini's sum-and-erase</a>, Glad Hobo Express Blog, Jul 28 2022
%H Hans Havermann, <a href="/A359143/a359143_2.txt">A cycle of length 49</a> [Astonishing! - _N. J. A. Sloane_, Jan 31 2023]
%H N. J. A. Sloane, New Gilbreath Conjectures, Sum and Erase, Dissecting Polygons, and Other New Sequences, Doron Zeilberger's Exper. Math. Seminar, Rutgers, Sep 14 2023: <a href="https://vimeo.com/866583736?share=copy">Video</a>, <a href="http://neilsloane.com/doc/EMSep2023.pdf">Slides</a>, <a href="http://neilsloane.com/doc/EMSep2023.Updates.txt">Updates</a>. (Mentions this sequence.)
%t a[1] = {1, 1}; nn = 21; Do[If[FreeQ[#3, #2], Set[k, #1~Join~#3], Set[k, #1~Join~#3]; Set[k, DeleteCases[#1~Join~#3, #2]]] & @@ {#, First[#], IntegerDigits@ Total[#]} &[a[n - 1]]; Set[a[n], k], {n, 2, nn}]; Array[(1 - 2 Boole[First[#] == 0])*FromDigits@ # &@ a[#] &, nn] (* _Michael De Vlieger_, Mar 16 2023 *)
%Y Cf. A359142, A361350, A361501.
%K sign,base
%O 0,1
%A _N. J. A. Sloane_, Jan 31 2023, based on suggestions from _Eric Angelini_ and _Hans Havermann_