[seqfan] K(n)—>a(n).

David Sycamore djsycamore at yahoo.co.uk
Tue Dec 10 15:29:07 CET 2019


For integer n let K(n) be the permutation of the digits of n formed by sequentially combining the greatest and smallest digits in adjacent pairs until running out of digits to play with. Examples: K(1)=1, K(10)=10, K(123)= 312, K(277272)=727272, K(539204)=905243.

(Definition is draft, suggestions to improve it are  welcome). 

We compute a(n) as follows:
Take the absolute difference |n-K(n)| to get a new number. Repeat the process with that number until reaching a number m for which K(m)=m, then a(n)=m. 

I get (by hand, so could be some bugs)

0,1,2,3,4,5,6,7,8,9,10,11,9,9,9,9,9,54,63,72,20,21,22,9,63,9...

Could there be some n for which the above trajectory loops? If so then how to define a(n)? (I have not found any such n yet..). 

A curious feature seems to be that if a(n) is other than n, then it is a multiple of 9, but I have not confirmed the veracity of this. 

Sequence does not seem to be in oeis

Any interest in this?
Best
David.

ps: Unless I am  mistaken a(123)=63, a(1234)=81, a(4321)=63, a(12345)=70434. 





More information about the SeqFan mailing list