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 A216557 #41 Dec 23 2024 14:53:43 %S A216557 10,9,9,9,9,9,9,9,9,9,9,19,28,37,46,55,64,73,82,90,0,9,19,28,37,46,55, %T A216557 64,73,82,0,89,9,19,28,37,46,55,64,73,0,79,89,9,19,28,37,46,55,64,0, %U A216557 69,79,89,9,19,28,37,46,55,0,59,69,79,89,9,19,28,37,46,0,49,59,69,79,89,9,19,28,37,0,39,49,59,69,79,89,9,19,28,0,29,39,49,59,69,79 %N A216557 Number of iterations of A216556 until the initial value n appears as a substring of the iterate; 0 if this will never happen. %C A216557 Can someone prove (and maybe strengthen) the following conjecture: a(n) = 0 whenever A216587(m) = -1 for all m obtained by concatenating any digit to the left and any digit to the right of n. %C A216557 From _Lars Blomberg_, Jan 01 2020: (Start) %C A216557 The nonzero a(n) take only 18 different values: (9, 10, 19, 28, 29, 37, 39, 46, 49, 55, 59, 64, 69, 73, 79, 82, 89, 90). For n < 10^12 the corresponding counts are (108, 75, 829, 388, 306, 326, 302, 289, 291, 277, 303, 265, 315, 254, 327, 245, 339, 2). Specifically a(19) = a(210) = 90. %C A216557 Nonzero terms are becoming increasingly sparse. For k = 1..12 the number of nonzero a(n) for n < 10^k is (10, 92, 247, 489, 797, 1194, 1678, 2236, 2860, 3565, 4359, 5421). (End) %H A216557 Lars Blomberg, <a href="/A216557/b216557.txt">Table of n, a(n) for n = 0..10000</a> %H A216557 Eric Angelini, <a href="https://web.archive.org/web/*/http://list.seqfan.eu/oldermail/seqfan/2012-September/010124.html">Strings resurrection</a>, SeqFan mailing list, Sep 08 2012 %F A216557 a(n)=0 for all numbers having "20", "30", ..., "90" or "00" or "111", "222", ... "999" as a substring. %e A216557 a(211) = 9 since under the action of A216556, 211 -> 322 -> 433 -> 544 -> 655 -> 766 -> 877 -> 988 -> 1099 -> 211010, which contains the substring 211. %e A216557 a(111) = 0 since if some number has "111" as its substring, then its preimage for A216556 (cf. A216587) contains at least the substring "00" (e.g., A216587(21110) = 1009), and has in turn no preimage under A216556. Therefore 111 cannot occur as a substring in the orbit of any number under A216556. %o A216557 (PARI) A216557(n, L=9e9, f)={my(s=Mod(n,10^#Str(n)), t=n); n && until(20>t\=10, t%1000%111||return; t%10 || t%100==10 || return); for(i=1,L, t=n=A216556(n); until(!t\=10, s==t && return(i))); f} \\ 3rd (optional) argument f allows to specify a return value (e.g., f=[] or -1) in case no result is found within the limit of L iterations. If the zero result is deduced from the initial value (cf. FORMULA) the function returns an empty result (which also evaluates to 0). [PARI syntax updated Jan 02 2020] %Y A216557 See A216603 for the list of n such that a(n) = 0. - _M. F. Hasler_, Sep 09 2012 %K A216557 nonn,base %O A216557 0,1 %A A216557 _M. F. Hasler_, Sep 08 2012 %E A216557 Corrected typo in a(69): 4 -> 46 by _Lars Blomberg_, Jan 01 2020