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.

A268312 First number of the periodic part of the "Say what you see" trajectory (see A005151) of n.

This page as a plain text file.
%I A268312 #21 Jan 19 2025 11:45:54
%S A268312 1031223314,21322314,21322314,21322314,21322314,3122331415,3122331416,
%T A268312 3122331417,3122331418,3122331419,1031223314,21322314,21322314,
%U A268312 21322314,21322314,3122331415,3122331416,3122331417,3122331418,3122331419,10311233,21322314,22,21322314,31123314,31123315
%N A268312 First number of the periodic part of the "Say what you see" trajectory (see A005151) of n.
%C A268312 a(40) is the first time the periodic part of the trajectory contains more than one term.
%H A268312 Julien Kluge, <a href="/A268312/b268312.txt">Table of n, a(n) for n = 0..10000</a>
%e A268312 Consider the starting value n = 5. We see one five: 15. We have one one and one five: 1115. We have three ones and one five: 3115... We reach 3122331415 which produces itself. So a(5) = 3122331415.
%t A268312 a005151[n_, m_] :=
%t A268312   FromDigits[
%t A268312    Reverse /@
%t A268312      Sort[Tally[
%t A268312        If[n == 2, m, a005151[n - 1, m]] //
%t A268312         IntegerDigits], #1[[1]] < #2[[1]] &] // Flatten];
%t A268312 a[n_] := Block[{previousNum = 0, currentNum = 1, knownNums = {n}},
%t A268312   For[i = 2, currentNum != previousNum, ++i,
%t A268312    previousNum = currentNum;
%t A268312    currentNum = a005151[i, n];
%t A268312    If[MemberQ[knownNums, currentNum], Return[currentNum],
%t A268312     AppendTo[knownNums, currentNum]];
%t A268312    ];
%t A268312   Return[currentNum];
%t A268312   ]
%t A268312 a /@ Range[0, 100]
%Y A268312 A005151 shows a(1) at term number 13.
%Y A268312 Cf. A047841.
%K A268312 nonn,easy,base
%O A268312 0,1
%A A268312 _Julien Kluge_, Jan 31 2016