The OEIS is supported by the many generous donors to the OEIS Foundation.



Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”).

Other ways to Give
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A177686 If a1a2a3 is a 3-digit integer in a concatenated form, we define two permutations of its digits as follows: P1(a1a2a3)=a2a3a1 and P2(a1a2a3)=a1a3a2, then we take the absolute value of their difference. Thus we form a sequence: a1a2a3, abs(P1(a1a2a3)-P2(a1a2a3)), and so on. 0
99, 891, 198, 792, 297, 693, 396, 594, 495 (list; graph; refs; listen; history; text; internal format)



This is an alternative to Kaprekar's routine. It would be interested in studying 4-digit integers with the permutations P1(a1a2a3a4)=a2a3a4a1 and P2(a1a2a3a4)=a1a3a4a2. Other permutations can be also studied. A generalization of Kaprekar's routine is the following: Let f be an operator that maps a finite set A={a1, a2, ..., a_p}, with p>=1 elements, into itself. Then, for any value 'a' in A, we have f(a) belongs to A too. If we iterate this operator multiple times, we get a chain: a, f(a), f(f(a)), ..., f(f...f(a)...), ... all of whose elements are in A. But, since A is finite, after at most p iterations we get two equal iterations. Therefore we end up in a finite cycle (of one or more terms).


Table of n, a(n) for n=1..9.

F. Smarandache, Proposed Problems of Mathematics, Vol. II, State University of Moldova Press, Kishinev, pp. 83-84, 1997.

F. Smarandache, Generalization and alternatives of Kaprekar's routine, Multispace & Multistructure / Neutrosophic Transdisciplinarity, Northern-European Publishers, pp. 555-559, Finland, 2010. arXiv:1005.3235


abs(P1(a1a2a3)-P2(a1a2a3)) = abs(a2a3a1-a1a3a2) = 99x(a2-a1).


Starting with 100, we get abs(001-100)=099, then abs(990-099)=891, then abs(918-819)=099, etc. So 100, 099, 891, 099, ... (the cycle is 099, 891). Each three-digit number ends up in a cycle of two terms (such as: 99 and 891, or 198 and 792, or 297 and 693, or 396 and 594), or in a constant 495 (as in Kaprekar's routine).

Starting with 495, we get abs(954-459)=495 (cycle of one term).


Cf. A090429, A099010.

Sequence in context: A154359 A185499 A061366 * A135219 A182672 A124113

Adjacent sequences: A177683 A177684 A177685 * A177687 A177688 A177689




F. Smarandache (smarand(AT)unm.edu), May 10 2010


Added keyword:base,fini,full as there are only 9 different values obtained by the abs() starting from any a1a2a3 in the range 100 to 999 R. J. Mathar, May 15 2010



Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 7 17:25 EST 2022. Contains 358668 sequences. (Running on oeis4.)