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 A179329 #18 Dec 14 2014 07:32:57 %S A179329 0,0,1,0,2,0,1,3,3,0,1,0,2,4,4,0,4,0,1,2,2,0,1,5,3,5,5,0,5,0,1,5,5,2, %T A179329 1,0,2,3,3,0,3,0,1,2,2,0,6,6,4,6,6,0,6,6,1,6,6,0,1,0,2,6,6,3,6,0,3,2, %U A179329 2,0,1,0,3,4,4,4,4,0,1,4,4,0,1,3,2,3,3,0,3,7,1,7,7,5,7,0,5,7,7,0,7,0,1,7,7 %N A179329 Number of iterations of (n + lpf(n)) / 2 required to reach a prime, where lpf equals the least prime factor. %C A179329 Zeros indicate prime indices. %e A179329 a(15) gives (15 + 3) / 2 = 9, (9 + 3) / 2 = 6, (6 + 2) / 2 = 4, (4 + 2) / 2 = 3. Four iterations were required to reach a prime, so a(15) = 4. %t A179329 f[n_] := Length@ NestWhileList[(# + FactorInteger[#][[1, 1]])/2 &, n, ! PrimeQ@ # &] - 1; Array[f, 105, 2] %Y A179329 Cf. A177980, A020639, A061228. %K A179329 nonn %O A179329 2,5 %A A179329 _Grant Garcia_, Jan 12 2011