A341035 a(n) is the smallest positive integer such that n+a(n) contains the string n-a(n), in both forward and reverse directions, as a substring. If no such number exists then a(n) = -1.
-1, -1, -1, -1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 10, 10, 15, 15, 15, 15, 15, 20, 20, 20, 20, 20, 25, 25, 25, 25, 25, 29, 30, 30, 30, 30, 33, 34, 35, 35, 35, 37, 38, 39, 40, 40, 41, 42, 43, 44, 45, 50, 50, 50, 50, 50, 55, 50, 51, 52, 53, 54, 60, 60, 60, 60, 65, 50, 50, 65, 65, 70, 70, 70
Offset: 1
Examples
a(5) = 5 as 5+5 = 10 which contains both 5-5 = 0 and reverse(0) = 0 as a substring. a(15) = 10 as 15+10 = 25 which contains both 15-10 = 5 and reverse(5) = 5 as a substring. a(61) = 50 as 61+50 = 111 which contains both 51-50 = 11 and reverse(11) = 11 as a substring. a(71) = 50 as 71+50 = 121 which contains both 71-50 = 21 and reverse(21) = 12 as a substring. a(1902) = 1829 as 1902+1829 = 3731 which contains both 1902-1829 = 73 and reverse(73) = 37 as a substring.
Links
- Scott R. Shannon, Image of the terms for n=5..100000.
Comments