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.

Previous Showing 11-13 of 13 results.

A072139 Last term of the preperiodic part of the 'Reverse and Subtract' trajectory of n, or -1 if the trajectory is completely periodic.

Original entry on oeis.org

-1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 11, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 22, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 33, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 44, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 55, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 66, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 77, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 88, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 99, 99, 101, 99
Offset: 0

Views

Author

Klaus Brockhaus, Jun 24 2002

Keywords

Comments

'Reverse and Subtract' (cf. A072137) is defined by x -> |x - reverse(x)|. For small n the positive terms are the first palindrome in the trajectory of n, so this sequence is a weak analog of A033865, which uses 'Reverse and Add'. a(1012) = 8712 is the first non-palindrome (cf. A072140). For k in A072140, A072141 or A072142 we have a(k) = -1.

Examples

			a(0) = -1, since 0 -> |0 - 0| = 0, the preperiodic part is empty; a(12) = 9, since 12 -> |12 - 21| = 9.
		

Crossrefs

A335978 Numbers m of the form abs(k - reverse(k)) for at least one k.

Original entry on oeis.org

0, 9, 18, 27, 36, 45, 54, 63, 72, 81, 90, 99, 180, 189, 198, 270, 279, 297, 360, 369, 396, 450, 459, 495, 540, 549, 594, 630, 639, 693, 720, 729, 792, 810, 819, 891, 900, 909, 990, 999, 1089, 1179, 1188, 1269, 1278, 1359, 1368, 1449, 1458, 1539, 1548, 1629, 1638, 1719, 1728, 1800, 1809, 1818, 1890, 1908, 1980, 1989, 1998, 2079
Offset: 1

Views

Author

Michael Greaney, Jul 03 2020

Keywords

Comments

All terms are divisible by 9.
Let f(k) = k - reverse(k). Then f(reverse(k)) = -f(k), since f(reverse(k)) = reverse(k) - reverse(reverse(k)) = reverse(k) - k = - (k - reverse(k)) = -f(k).
Iteration of the function f(k) = k - reverse(k) leads to A072140, A072141, A072142, and A072143.

Crossrefs

Dividing by 9 gives A334145.

A109891 Least number that requires n steps to reach 0 by repeated application of f: x -> abs(x - reverse(x)).

Original entry on oeis.org

0, 1, 10, 16, 14, 15, 13, 1011, 1017, 1037, 1027, 1014, 1013, 1028, 100143, 100135, 100145, 100134, 100103, 100195, 100137, 100227, 100114, 100128, 100194, 100107, 100307, 100277, 100413, 100345, 100429, 100215, 100444, 100237, 100433, 100335
Offset: 0

Views

Author

Amarnath Murthy, Jul 13 2005

Keywords

Comments

Coincides with A072138 for the first 14 and many later terms.

Examples

			f(16) = 61-16 = 45, f(45) = 54-45 = 9, f(9) = 9-9 = 0. For no k < 16 exactly three steps lead to 0, hence a(3) = 16.
		

Crossrefs

Extensions

Edited, corrected and extended by Klaus Brockhaus, Jul 14 2005
Previous Showing 11-13 of 13 results.