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.

Showing 1-10 of 20 results. Next

A073144 Smallest m such that the 'Reverse and Subtract' trajectory (cf. A072137) of m leads to A073142(n).

Original entry on oeis.org

0, 1012, 10001145, 100000114412, 100010505595
Offset: 1

Views

Author

Klaus Brockhaus, Jul 17 2002

Keywords

Comments

Presumably a(6) = 1000000011011012.

Examples

			1012 -> 1089 -> 8712 -> 6534 -> 2178 = A073142(1) and no m < 1012 leads to 2178.
		

Crossrefs

Extensions

Offset changed by N. J. A. Sloane, Dec 01 2007

A072142 Numbers n such that 14 applications of 'Reverse and Subtract' lead to n, whereas fewer than 14 applications do not lead to n.

Original entry on oeis.org

11436678, 13973058, 19582398, 23981958, 30581397, 32662377, 33218856, 42464466, 44664246, 48737106, 61936974, 69746193, 71064873, 76226733
Offset: 1

Views

Author

Klaus Brockhaus, Jun 24 2002

Keywords

Comments

There are 14 eight-digit terms in the sequence. Further terms are obtained (a) by inserting at the center of these terms either any number of 9's (for 11436678, 32662377, 33218856, 76226733) or any number of 0's (for the other ten terms) and (b) by concatenating a term any number of times with itself and inserting an equal number of 0's at all junctures. Method (b) may be applied recursively to all terms. - Revised thanks to a comment from Hans Havermann, Jan 20 2004.

Examples

			11436678 -> 76226733 -> 42464466 -> 23981958 -> 61936974 -> 13973058 -> 71064873 -> 33218856 -> 32662377 -> 44664246 -> 19582398 -> 69746193 -> 30581397 -> 48737106 -> 11436678.
		

Crossrefs

Formula

n = f^14(n), n <> f^k(n) for k < 14, where f: x -> |x - reverse(x)|.

A072143 Numbers n such that 22 applications of 'Reverse and Subtract' lead to n, whereas fewer than 22 applications do not lead to n.

Original entry on oeis.org

108811891188, 115521884478, 117611882388, 125520874479, 177781822218, 215511784488, 242351757648, 248841751158, 278882721117, 428823571176, 432244567755, 442243557756, 455663544336, 602315397684, 604405395594
Offset: 1

Views

Author

Klaus Brockhaus, Jun 24 2002

Keywords

Comments

There are 22 twelve-digit terms in the sequence. Further terms are obtained (a) by inserting at the center of these terms any number of 9's and (b) by concatenating a term any number of times with itself and inserting an equal number of 0's at all junctures. Method (b) may be applied recursively to all terms. - Revised thanks to a comment from Hans Havermann, Jan 27 2004
All terms are divisible by 10999989. - Hugo Pfoertner, Sep 23 2020

Examples

			108811891188 -> 772386227613 -> 455663544336 -> 177781822218 -> 634446365553 -> 278882721117 -> 432244567755 -> 125520874479 -> 848957151042 -> 608805391194 -> 117611882388 -> 765676234323 -> 442243557756 -> 215511784488 -> 668975331024 -> 248841751158 -> 602315397684 -> 115521884478 -> 758966241033 -> 428823571176 -> 242351757648 -> 604405395594 -> 108811891188.
		

Crossrefs

Formula

n = f^22(n), n <> f^k(n) for k < 22, where f: x -> |x - reverse(x)|.

A072719 Numbers n such that 17 applications of 'Reverse and Subtract' lead to n, whereas fewer than 17 applications do not lead to n.

Original entry on oeis.org

1186781188132188, 1464465185355348, 2178772178212278, 2191191178088088, 2196702178032978, 2202202177977978, 2334334176656658, 3041250269587497, 4361064356389356, 4906609350933906, 6232232537677674, 6543356534566434
Offset: 1

Views

Author

Klaus Brockhaus, Jul 15 2002

Keywords

Comments

There are 17 sixteen-digit terms in the sequence. Further terms are obtained (a) by inserting at the center of these terms any number of 9's and (b) by concatenating a term any number of times with itself and inserting an equal number of 0's at all junctures. Method (b) may be applied recursively to all terms. - Revised thanks to a comment from Hans Havermann, Jan 27 2004.
This is a working sequence. It is neither by computation nor by proof guaranteed that there are no smaller or interleaved terms.
All terms are divisible by 1099999989. - Hugo Pfoertner, Sep 23 2020

Examples

			1186781188132188 -> 7625537623744623 -> 4361064356389356 -> 2178772178212278 -> 6543356534566434 -> 2196702178032978 -> 6595606534043934 -> 2202202177977978 -> 6595595534044044 -> 2191191178088088 -> 6617617533823824 -> 2334334176656658 ->  6232232537677674 -> 1464465185355348 -> 6971070630289293 -> 3041250269587497 -> 4906609350933906 -> 1186781188132188.
		

Crossrefs

Formula

n = f^17(n), n <> f^k(n) for k < 17, where f: x -> |x - reverse(x)|.

A072718 Numbers n such that 12 applications of 'Reverse and Subtract' lead to n, whereas fewer than 12 applications do not lead to n.

Original entry on oeis.org

118722683079, 138346366158, 178574614218, 277673713317, 316920881277, 336544564356, 435643663455, 455267148336, 614218178574, 633841861653, 713317277673, 851663544732
Offset: 1

Views

Author

Klaus Brockhaus, Jul 15 2002

Keywords

Comments

There are 12 twelve-digit terms in the sequence. Further terms are obtained (a) by inserting at the center of these terms either any number of 0's (for 178574614218, 277673713317, 614218178574, 713317277673) or any number of 9's (for the other eight terms) and (b) by concatenating a term any number of times with itself and inserting an equal number of 0's at all junctures. Method (b) may be applied recursively to all terms. - Revised thanks to a comment from Hans Havermann, Jan 27 2004.

Examples

			118722683079 -> 851663544732 -> 614218178574 -> 138346366158 -> 713317277673 -> 336544564356 -> 316920881277 -> 455267148336-> 178574614218-> 633841861653-> 277673713317-> 435643663455-> 118722683079.
		

Crossrefs

Formula

n = f^12(n), n <> f^k(n) for k < 12, where f: x -> |x - reverse(x)|.

A072141 Numbers n such that two applications of 'Reverse and Subtract' lead to n, whereas one application does not lead to n.

Original entry on oeis.org

2178, 6534, 21978, 65934, 219978, 659934, 2199978, 6599934, 21782178, 21999978, 65346534, 65999934, 217802178, 219999978, 653406534, 659999934, 2178002178, 2197821978, 2199999978, 6534006534, 6593465934, 6599999934
Offset: 1

Views

Author

Klaus Brockhaus, Jun 24 2002

Keywords

Comments

There are two four-digit terms in the sequence. Further terms are obtained (a) by inserting at the center of these terms any number of 9's and (b) by concatenating a term any number of times with itself and inserting an equal number of 0's at all junctures. Method (b) may be applied recursively to all terms. - Revised thanks to a comment from Hans Havermann, Jan 27 2004.
Solutions to x = f^k(x), x <> f^j(x) for j < k, where f: n -> |n - reverse(n)|, for period lengths k <= 22 are given by:
.k..smallest.solution..smallest.n.with.period.k..sequence
.1..................0.........................0.......---
.2...............2178......................1012..(this one)
14...........11436678..................10001145...A072142
22.......108811891188..............100000114412...A072143
12.......118722683079..............100010505595...A072718
17...1186781188132188..........1000000011011012...A072719
I still have no answer to the question if there exist solutions for other values of k. Random tests for larger n (up to 50 digits) have shown that periods 1 and 2 are very frequent (> 90 %), period 14 is not unusual (7 to 8 %), periods 22, 12 and 17 are very rare and other periods did not appear.
I conjecture that for some k there are no solutions, while in other cases the minimal solutions will have 20, 24, 28, ... digits (which however are very hard to find).

Examples

			6534 -> |6534 - 4356| = 2178 -> |2178 - 8712| = 6534.
		

Crossrefs

Formula

n = f(f(n)), n <> f(n), where f: x -> |x - reverse(x)|.

Extensions

More terms from Ray Chandler, Oct 09 2017

A151962 Length of preperiodic part of trajectory of n under iteration of the Kaprekar map in A151949.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 6, 4, 5, 3, 3, 5, 4, 6, 2, 1, 2, 6, 4, 5, 3, 3, 5, 4, 6, 2, 1, 2, 6, 4, 5, 3, 3, 5, 4, 6, 2, 1, 2, 6, 4, 5, 3, 3, 5, 4, 6, 2, 1, 2, 6, 4, 5, 3, 3, 5, 4, 6, 2, 1, 2, 6, 4, 5, 3, 3, 5, 4, 6, 2, 1, 2, 6, 4, 5, 3, 3, 5, 4, 6, 2, 1, 2, 6, 4, 5, 3, 3, 5, 4, 6, 2
Offset: 0

Views

Author

N. J. A. Sloane, Aug 19 2009

Keywords

Examples

			13 -> 18 -> 63 -> 27 -> 45 -> 9 -> 0 -> 0, so a(13)=6.
		

Crossrefs

Cf. A151949, A151963. Strictly different from A072137.
In other bases: A164885 (base 2), A164995 (base 3), A165014 (base 4), A165034 (base 5), A165053 (base 6), A165073 (base 7), A165092 (base 8), A165112 (base 9). - Joseph Myers, Sep 05 2009

Programs

  • Maple
    A151949 := proc(n)
    local tup;
    tup := sort(convert(n,base,10)) ;
    add( (op(i,tup)-op(-i,tup)) *10^(i-1),i=1..nops(tup)) :
    end:
    A151962 := proc(n)
    local tra,x ;
    tra := [n] ;
    x := n ;
    while true do
    x := A151949(x) ;
    if member(x,tra,'l') then
    RETURN(l-1) ;
    fi;
    tra := [op(tra),x] :
    od:
    end:
    seq(A151962(n),n=0..120) ;
    # R. J. Mathar, Aug 20 2009

Extensions

More terms from R. J. Mathar, Aug 20 2009

A072140 The period length of the 'Reverse and Subtract' trajectory of n is greater than 1.

Original entry on oeis.org

1012, 1023, 1034, 1045, 1067, 1078, 1089, 1100, 1122, 1133, 1144, 1155, 1177, 1188, 1199, 1210, 1232, 1243, 1254, 1265, 1287, 1298, 1320, 1342, 1353, 1364, 1375, 1397, 1408, 1430, 1452, 1463, 1474, 1485, 1507, 1518, 1540, 1562, 1573, 1584, 1595, 1606
Offset: 1

Views

Author

Klaus Brockhaus, Jun 24 2002

Keywords

Comments

'Reverse and Subtract' (cf. A072137) is defined by x -> |x - reverse(x)|. There is no number k > 0 such that |k - reverse(k)| = k, so 0 is the only period with length 1. Consequently this sequence consists of the numbers n such that repeated application of 'Reverse and Subtract' does not lead to a palindrome. It is an analog of A023108, which uses 'Reverse and Add'. - A072141, A072142, A072143 give the numbers which generate periods of length 2, 14, 22 respectively.

Examples

			1012 -> |1012 - 2101| = 1089 -> |1089 - 9801| = 8712 -> |8712 - 2178| = 6534 -> |6534 - 4356| = 2178 -> |2178 - 8712| = 6534; the period of the trajectory is 6534, 2178 and a palindrome is never reached.
		

Crossrefs

Programs

  • Haskell
    import Data.List (find, findIndices, inits)
    import Data.Maybe (fromJust)
    spanCycle :: Eq a => (a -> a) -> a -> ([a],[a])
    spanCycle f x = fromJust $ find (not . null . snd) $
                               zipWith (span . (/=)) xs $ inits xs
                    where xs = iterate f x
    a072140_list = findIndices (> 1) $
                   map (length . snd . spanCycle (abs . a056965)) [0..]
    -- eop.
    -- Reinhard Zumkeller, Oct 24 2010

A072146 Numbers n with property that n sets a new record for the length of the preperiodic part of the 'Reverse and Subtract' trajectory of n.

Original entry on oeis.org

0, 1, 10, 13, 1011, 1013, 1028, 100103, 100107, 100184, 100368, 100484, 113008, 150703, 10000235, 10000434, 10001104, 10001285, 10001777, 10001788, 10002395, 10002494, 10109075, 1000002787, 1000011068, 1000011159, 1000012729, 1001050344
Offset: 1

Views

Author

Klaus Brockhaus, Jun 24 2002

Keywords

Comments

A072147 gives the corresponding records. Since for small n the last term of the preperiodic part is a palindrome (cf. A072137), this sequence is a weak analog of A065198, which uses 'Reverse and Add'.

Examples

			The preperiodic part of the trajectory of 13 has length 6: 13 -> 18 -> 63 -> 27 -> 45 -> 9; for k < 13 the preperiodic part has a smaller length (at most 2).
		

Crossrefs

Extensions

a(19) = 10001777 inserted by Alexander Pesch, May 29 2007
Edited by N. J. A. Sloane, Dec 01 2007

A073142 List of smallest solutions for some k of x = f^k(x), n <> f^j(n) for j < k, where f: m -> |m - reverse(m)|.

Original entry on oeis.org

0, 2178, 11436678, 108811891188, 118722683079
Offset: 1

Views

Author

Klaus Brockhaus, Jul 17 2002

Keywords

Comments

In the definition, j can be restricted to proper divisors of k. A073143 gives the corresponding values of k. A073144(n) gives the smallest m such that the 'Reverse and Subtract' trajectory of m leads to a(n). Presumably a(6) = 1186781188132188 with k = 17.

Examples

			a(3) = 11436678 is the smallest solution of x = f^14(x) and there is no k such that x = f^k(x) has a smallest solution between a(2) = 2178 and a(3).
		

Crossrefs

Extensions

Offset changed by N. J. A. Sloane, Dec 01 2007
Showing 1-10 of 20 results. Next