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.
%I A156055 #11 May 10 2025 02:31:43 %S A156055 1,2,3,6,4,30,7,54,3,32,5,29,31,0,3,19,8,112,55,15,27,3,3,26,1,20,223, %T A156055 102,33,13,6,162,1,9,10,75,30,113,21 %N A156055 Define a map f by f(0) = f(1) = 0, otherwise f(k) = A087712(k); then a(n) is the number of steps for the trajectory of n under repeated iteration of f to "terminate". %C A156055 Here "terminate" means reaching 0 or a cycle. %C A156055 From _M. F. Hasler_, Feb 11 2009: (Start) %C A156055 "Reaching a cycle" could be better defined: does it mean "reach a value that occurred earlier" or "reach an element belonging to a cycle"? %C A156055 I think the second is the case, but the value 0 is currently listed at n=14, wouldn't it correspond to x=15 = least element of a nontrivial cycle? %C A156055 So would the offset be 2 ? or is there a missing term (since the first terms 1,2,3 seem well to correspond to x=1,2,3)? (End) %e A156055 a(4) = 6 because 4 -> [{2,2}->{1,1}] ->[{11}->{5}] -> [{5}->{3}] -> [{3}->{2}] -> [{2}->{1}] -> [{1}->{0}]. %t A156055 f[n_] := FromDigits@ Flatten[ IntegerDigits@# & /@ (PrimePi@# & /@ Flatten[ Table[ First@#, {Last@#}] & /@ FactorInteger@n])]; g[n_] := Length@ NestWhileList[f, n, UnsameQ, All] - 2; Array[g, 39] %Y A156055 A variant of A098282, which is the official version of this sequence. %Y A156055 Cf. A087712. %K A156055 base,nonn,more %O A156055 1,2 %A A156055 _Robert G. Wilson v_, Feb 02 2009 %E A156055 Edited by _N. J. A. Sloane_, Feb 10 2009