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.

A216557 Number of iterations of A216556 until the initial value n appears as a substring of the iterate; 0 if this will never happen.

Original entry on oeis.org

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, 64, 73, 82, 0, 89, 9, 19, 28, 37, 46, 55, 64, 73, 0, 79, 89, 9, 19, 28, 37, 46, 55, 64, 0, 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
Offset: 0

Views

Author

M. F. Hasler, Sep 08 2012

Keywords

Comments

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.
From Lars Blomberg, Jan 01 2020: (Start)
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.
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)

Examples

			a(211) = 9 since under the action of A216556, 211 -> 322 -> 433 -> 544 -> 655 -> 766 -> 877 -> 988 -> 1099 -> 211010, which contains the substring 211.
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.
		

Crossrefs

See A216603 for the list of n such that a(n) = 0. - M. F. Hasler, Sep 09 2012

Programs

  • 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]

Formula

a(n)=0 for all numbers having "20", "30", ..., "90" or "00" or "111", "222", ... "999" as a substring.

Extensions

Corrected typo in a(69): 4 -> 46 by Lars Blomberg, Jan 01 2020