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 A098282 #31 Dec 23 2016 21:56:36 %S A098282 1,2,3,6,4,31,7,55,4,33,5,30,32,1,4,19,8,112,56,16,27,4,4,26,2,20,223, %T A098282 102,34,14,6,162,2,9,10,75,31,113,21,100,33,20,2,23,30,57,5,28,24,30, %U A098282 224,269,20,295,11,85,103,140,9,71,113,55,34,110,76,49,57 %N A098282 Iterate the map k -> A087712(k) starting at n; a(n) is the number of steps at which we see a repeated term for the first time; or -1 if the trajectory never repeats. %C A098282 The old entry with this A-number was a duplicate of A030298. %C A098282 a(52) is currently unknown. - _Donovan Johnson_ %C A098282 a(52)-a(10000) were found using a conjunction of Mathematica and Kim Walisch's primecount program. The additional values of the prime-counting function can be found in the second a-file. - _Matthew House_, Dec 23 2016 %H A098282 Matthew House, <a href="/A098282/b098282.txt">Table of n, a(n) for n = 1..10000</a> %H A098282 Farideh Firoozbakht, <a href="/A098282/a098282.txt">Notes on the missing terms in this sequence</a> %H A098282 Matthew House, <a href="/A098282/a098282_1.txt">Values found using primecount</a> %e A098282 1 -> 1; 1 step to see a repeat, so a(1) = 1. %e A098282 2 -> 1 -> 1; 2 steps to see a repeat. %e A098282 3 -> 2 -> 1 -> 1; 3 steps to see a repeat. %e A098282 4 -> 11 -> 5 -> 3 -> 2 -> 1 -> 1; 6 steps to see a repeat. %e A098282 6 -> 12 -> 112 -> 11114 -> 1733 -> 270 -> 12223 -> 7128 -> 11122225 -> 33991010 -> 13913661 -> 2107998 -> 12222775 -> 33910130 -> 131212367 -> 56113213 -> 6837229 -> 4201627 -> 266366 -> 112430 -> 131359 -> 7981 -> 969 -> 278 -> 134 -> 119 -> 47 -> 15 -> 23 -> 9 -> 22 -> 15; 31 steps to see a repeat. %e A098282 9 -> 22 -> 15 -> 23 -> 9; 4 steps to see a repeat. %e A098282 From _David Applegate_ and _N. J. A. Sloane_, Feb 09 2009: (Start) %e A098282 The trajectories of the numbers 1 through 17, up to and including the first repeat, are as follows. Note that a(n) is one less than the number of terms shown. %e A098282 [1, 1] %e A098282 [2, 1, 1] %e A098282 [3, 2, 1, 1] %e A098282 [4, 11, 5, 3, 2, 1, 1] %e A098282 [5, 3, 2, 1, 1] %e A098282 [6, 12, 112, 11114, 1733, 270, 12223, 7128, 11122225, 33991010, 13913661, 2107998, 12222775, 33910130, 131212367, 56113213, 6837229, 4201627, 266366, 112430, 131359, 7981, 969, 278, 134, 119, 47, 15, 23, 9, 22, 15] %e A098282 [7, 4, 11, 5, 3, 2, 1, 1] %e A098282 [8, 111, 212, 1116, 112211, 52626, 124441, 28192, 11111152, 111165448, 1117261018, 1910112963, 252163429, 42205629, 2914219, 454002, 127605, 231542, 110938, 15631, 44510, 13605, 23155, 3582, 12246, 12637, 1509, 296, 11112, 111290, 131172, 1127117, 76613, 9470, 13161, 21328, 11111114, 14142115, 3625334, 1125035, 348169, 78151, 11369, 1373, 220, 1135, 349, 70, 134, 119, 47, 15, 23, 9, 22, 15] %e A098282 [9, 22, 15, 23, 9] %e A098282 [10, 13, 6, 12, 112, 11114, 1733, 270, 12223, 7128, 11122225, 33991010, 13913661, 2107998, 12222775, 33910130, 131212367, 56113213, 6837229, 4201627, 266366, 112430, 131359, 7981, 969, 278, 134, 119, 47, 15, 23, 9, 22, 15] %e A098282 [11, 5, 3, 2, 1, 1] %e A098282 [12, 112, 11114, 1733, 270, 12223, 7128, 11122225, 33991010, 13913661, 2107998, 12222775, 33910130, 131212367, 56113213, 6837229, 4201627, 266366, 112430, 131359, 7981, 969, 278, 134, 119, 47, 15, 23, 9, 22, 15] %e A098282 [13, 6, 12, 112, 11114, 1733, 270, 12223, 7128, 11122225, 33991010, 13913661, 2107998, 12222775, 33910130, 131212367, 56113213, 6837229, 4201627, 266366, 112430, 131359, 7981, 969, 278, 134, 119, 47, 15, 23, 9, 22, 15] %e A098282 [14, 14] %e A098282 [15, 23, 9, 22, 15] %e A098282 [16, 1111, 526, 156, 1126, 1103, 185, 312, 11126, 1734, 1277, 206, 127, 31, 11, 5, 3, 2, 1, 1] %e A098282 [17, 7, 4, 11, 5, 3, 2, 1, 1] %e A098282 For n = 18 see A077960. %e A098282 (End) %p A098282 with(numtheory): %p A098282 f := proc(n) local t1, v, r, x, j; %p A098282 if (n = 1) then return 1; end if; %p A098282 t1 := ifactors(n): v := 0; %p A098282 for x in op(2,t1) do r := pi(x[1]): %p A098282 for j from 1 to x[2] do %p A098282 v := v * 10^length(r) + r; %p A098282 end do; end do; v; end proc; %p A098282 t := proc(n) local v, l, s; v := n; s := {v}; l := [v]; v := f(v); %p A098282 while not v in s do s := s union {v}; l := [op(l),v]; v := f(v); end do; %p A098282 [op(l),v]; %p A098282 end proc; [seq(nops(t(n))-1, n=1..17)]; %p A098282 # _David Applegate_ and _N. J. A. Sloane_, Feb 09 2009 %t A098282 f[n_] := If[n==1,1,FromDigits@ Flatten[ IntegerDigits@# & /@ (PrimePi@# %t A098282 & /@ Flatten[ Table[ First@#, {Last@#}] & /@ FactorInteger@n])]]; %t A098282 g[n_] := Length@ NestWhileList[f, n, UnsameQ, All] - 1; Array[g, 39] %t A098282 (* _Robert G. Wilson v_, Feb 02 2009; modified slightly by _Farideh Firoozbakht_, Feb 10 2009 *) %o A098282 (GBnums) %o A098282 void ea (n) %o A098282 { %o A098282 mpz u[] ; // factors %o A098282 mpz tr[]; // sequence %o A098282 print(n); %o A098282 while(n > 1) %o A098282 { %o A098282 lfactors(u,n); // factorize into u %o A098282 vmap(u,pi); // replace factors by rank %o A098282 n = catv(u); // concatenate %o A098282 print(n); %o A098282 if(vsearch(tr,n) > 0) break; // loop found %o A098282 vpush(tr,n); // remember n %o A098282 } %o A098282 println(''); %o A098282 } %o A098282 // _Jacques Tramu_ %o A098282 (Haskell) %o A098282 import Data.List (genericIndex) %o A098282 a098282 n = f [n] where %o A098282 f xs = if y `elem` xs then length xs else f (y:xs) where %o A098282 y = genericIndex (map a087712 [1..]) (head xs - 1) %o A098282 -- _Reinhard Zumkeller_, Jul 14 2013 %Y A098282 Cf. A087712, A007097, A077960. See also A145077, A145078, A145079, A144760, A144813, A144814, A144915, A144914. %Y A098282 See A156055 for another version. %K A098282 nonn,base,nice %O A098282 1,2 %A A098282 _Eric Angelini_, Feb 02 2009 %E A098282 a(8) and a(10) found by _Jacques Tramu_ %E A098282 Extended through a(39) by _Robert G. Wilson v_, Feb 02 2009 %E A098282 Terms through a(39) corrected by _Farideh Firoozbakht_, Feb 10 2009 %E A098282 a(40)-a(51) from _Donovan Johnson_, Jan 08 2011 %E A098282 More terms from and a(40) corrected by _Matthew House_, Dec 23 2016