login
A339403
a(n) is the smallest positive integer such that n*a(n) contains the string n+a(n) in reverse as a substring. If no such number exists then a(n) = -1.
5
0, -1, 2, 24, 37, 26, 34, 35, 57, 9, -1, 12, 11, 45, 193, 228, 28, 51, 23, 44, 841, 11, 27, 18, 3, 626, 5, 22, 16, 46716, 56, 41, 33, 32, 6, 7, 21, 4, 3, 24, 592, 31, 7, 619, 19, 13, 38, 2, 117, 5, 463, 17, 34, 308, 33, 36, 30, 8, 31, 4, 23, 21, 648, 124, 921, 903, 386, 395, 4, 334, 755, 31, 563
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
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
KEYWORD
sign,look,base
AUTHOR
Scott R. Shannon, Dec 03 2020
STATUS
approved