OFFSET
0,1
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)
LINKS
Lars Blomberg, Table of n, a(n) for n = 0..10000
Eric Angelini, Strings resurrection, SeqFan mailing list, Sep 08 2012
FORMULA
a(n)=0 for all numbers having "20", "30", ..., "90" or "00" or "111", "222", ... "999" as a substring.
EXAMPLE
a(211) = 9 since under the action of A216556, 211 -> 322 -> 433 -> 544 -> 655 -> 766 -> 877 -> 988 -> 1099 -> 211010, which contains the substring 211.
PROG
(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]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
M. F. Hasler, Sep 08 2012
EXTENSIONS
Corrected typo in a(69): 4 -> 46 by Lars Blomberg, Jan 01 2020
STATUS
approved