OFFSET
0,3
COMMENTS
This is a variation of A339144 where, instead of the n*a(n) containing n+a(n) as a substring, it contains the reverse of the string n+a(n), including any leading zeros.
Based on a search limit of 5x10^9 up to n = 100000 the values of n for which no a(n) is found are n = 10^k, with k>=0, and 17500. A test of 175000 and 1750000 also found no a(n) indicating that all values of the form 17500*10^k may have no term for a(n).
It is found that when n = 200*10^k, with k>=0, the corresponding value for a(n) is significantly larger than neighboring terms. As an example a(20000) = 666843331, which is the largest term up to n = 100000.
Unlike A339144, which contains multiple consecutive terms with the same value of a(n), in this sequence the largest consecutive run of the same a(n) in the first 100000 terms is only two. The first term of these pairs occurs at n = 110, 121, 2717, 4368, 7916, 10100, 11211, 13231, 17271, 44573, 63529.
LINKS
Scott R. Shannon, Table of n, a(n) for n = 0..10000
EXAMPLE
a(3) = 24 as 3*24 = 72 which contains reverse(3+24) = reverse(27) = 72 as a substring.
a(6) = 34 as 6*34 = 204 which contains reverse(6+34) = reverse(40) = 04 as a substring. Note the leading zero is included.
a(29) = 46716 as 29*46716 = 1354764 which contains reverse(29+4671) = reverse(46745) = 54764 as a substring.
a(110) = 11 as 110*11 = 1210 which contains reverse(110+11) = reverse(121) = 121 as a substring. This is the first of two consecutive terms with a(n) = 11.
a(20000) = 666843331 as 20000*666843331 = 13336866620000 which contains reverse(20000+666843331) = reverse(666863331) = 133368666 as a substring. This is the largest value in the first 100000 terms.
PROG
(PARI) isok(n, k) = #strsplit(Str(n*k), concat(Vecrev(Str(n+k)))) > 1;
ispt(n) = my(t); ispower(n, , &t) && (t==10);
a(n) = {if ((n==1) || (n==10) || ispt(n), return (-1)); my(k=0); while (! isok(n, k), k++); k; } \\ Michel Marcus, Jan 22 2021
CROSSREFS
KEYWORD
AUTHOR
Scott R. Shannon, Dec 03 2020
STATUS
approved