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 A331032 #27 May 04 2020 13:39:21 %S A331032 0,0,1,0,2,0,4,2,0,1,6,0,10,3,0,4,12,3,16,0,2,5,18,2,0,9,1,1,22,0,28, %T A331032 12,4,11,0,9,30,15,8,5,36,0,40,3,4,17,42,11,0,3,10,7,46,15,2,0,14,21, %U A331032 52,7,58,27,0,2,6,1,60,9,16,0,66,11,70,29,10,13 %N A331032 Number of iterations of n -> n + gpf(n) needed for the trajectory of n to join the trajectory of A076271, where gpf(n) is the greatest prime factor of n. %C A331032 Record values occur at prime values of n, and equal one less than the next lowest prime number (see Formula). Because of this, a(n) is always less than n, so for any positive integer starting value n, iterations of n -> n + gpf(n) will eventually join A076271. %H A331032 Rémy Sigrist, <a href="/A331032/b331032.txt">Table of n, a(n) for n = 1..10000</a> %F A331032 a(k*p) = prevprime(p) - k for all k <= prevprime(p). %F A331032 a(p) = prevprime(p) - 1 for p > 2. %e A331032 a(8)=2 because the trajectory for 1 (sequence A076271) starts 1->2->4->6->9->12->15->20... and the trajectory for 8 starts 8->10->15->20... so the sequence beginning with 8 joins A076271 after 2 steps. %o A331032 (PARI) gpf(n) = if (n==1, 1, my (f=factor(n)); f[#f~, 1]) %o A331032 a(n) = { my (o=1); for (k=0, oo, while (o<n, o=o+gpf(o)); if (o==n, return (k), n=n+gpf(n))) } \\ _Rémy Sigrist_, Apr 05 2020 %Y A331032 Cf. A006530, A076271. %K A331032 nonn %O A331032 1,5 %A A331032 _Michael C. Case_, Jan 08 2020