login
Say what you see in previous term, reporting total number for each digit encountered.
24

%I #10 Jul 17 2015 02:02:42

%S 1,11,21,1211,3112,132112,311322,232122,421311,14123113,41141223,

%T 24312213,32142321,23322114,32232114,23322114,32232114,23322114,

%U 32232114,23322114,32232114,23322114,32232114,23322114,32232114

%N Say what you see in previous term, reporting total number for each digit encountered.

%C The digits of each term a(n) are a permutation of those of the corresponding term A005151(n). - _Chayim Lowen_, Jul 16 2015

%F After a while sequence has period 2.

%e To get the term after 311322, we say: two 3's, two 1's, two 2's, so 232122.

%t deldup[ lst_ ] := Module[ {i, s}, s={}; For[ i=1, i<=Length[ lst ], i++, If[ !MemberQ[ s, lst[ [ i ] ] ], AppendTo[ s, lst[ [ i ] ] ] ] ]; s ]; next[ term_ ] := FromDigits[ Flatten[ ({Count[ IntegerDigits[ term ], # ], #}&)/@deldup[ IntegerDigits[ term ] ] ] ]

%Y A variant of A005150, A005151, etc.

%K base,easy,nonn

%O 0,2

%A _N. J. A. Sloane_, Aug 25 2001

%E Corrected and extended by _Dean Hickerson_, Aug 27 2001