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.

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.

Original entry on oeis.org

-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

Views

Author

Scott R. Shannon, Feb 03 2021

Keywords

Comments

Based on a search limit of 5*10^9 up to n = 300000 the values of n for which no a(n) is found are n = 1,2,3,4. This is likely the complete list of values for which no a(n) exists.
The longest run of consecutive terms with the same value in the first 300000 terms is the run of 5's at the beginning of the sequence, ten in all. This is likely the longest run for all numbers.

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.
		

Crossrefs

Cf. A341034 (forward), A341028 (reverse), A339403, A339144, A328095, A333410, A332703.