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 A335906 #15 Jul 22 2020 13:26:01 %S A335906 1,1,3,1,4,3,4,1,6,4,5,3,5,4,7,1,7,6,8,4,7,5,6,3,9,5,10,4,9,7,8,1,8,7, %T A335906 9,6,9,8,8,4,9,7,10,5,11,6,7,3,9,9,11,5,13,10,10,4,12,9,10,7,9,8,11,1, %U A335906 10,8,10,7,9,9,10,6,10,9,13,8,11,8,10,4,15,9,10,7,13,10,13,5,14,11,10,6,12,7,15,3,10,9,12,9,15,11,14,5,13 %N A335906 Number of distinct integers encountered on all possible paths from n to any first encountered powers of 2 (that are included in the count), when using the transitions x -> x - (x/p) and x -> x + (x/p) in any order, where p is the largest prime dividing x. %H A335906 Antti Karttunen, <a href="/A335906/b335906.txt">Table of n, a(n) for n = 1..65537</a> %e A335906 From 9 one can reach with the transitions x -> A171462(x) (leftward arrow) and x -> A335876(x) (rightward arrow) the following six numbers, when one doesn't expand any power of 2 further: %e A335906 9 %e A335906 / \ %e A335906 6 12 %e A335906 / \ / \ %e A335906 4 8 16 %e A335906 thus a(9) = 6. %e A335906 From 10 one can reach with the transitions x -> A171462(x) and x -> A335876(x) the following for numbers, when one doesn't expand any power of 2 further: %e A335906 10 %e A335906 |\ %e A335906 | \ %e A335906 | 12 %e A335906 | /\ %e A335906 |/ \ %e A335906 8 16 %e A335906 thus a(10) = 4. %e A335906 From 15 one can reach with the transitions x -> A171462(x) and x -> A335876(x) the following seven numbers, when one doesn't expand any power of 2 further: %e A335906 15 %e A335906 / \ %e A335906 / \ %e A335906 12<----18 %e A335906 / \ \ %e A335906 / \ \ %e A335906 8 16<----24 %e A335906 \ %e A335906 \ %e A335906 32 %e A335906 thus a(15) = 7. %o A335906 (PARI) %o A335906 A171462(n) = if(1==n,0,(n-(n/vecmax(factor(n)[, 1])))); %o A335906 A335876(n) = if(1==n,2,(n+(n/vecmax(factor(n)[, 1])))); %o A335906 A209229(n) = (n && !bitand(n,n-1)); %o A335906 A335906(n) = { my(xs=Set([n]),allxs=xs,newxs,a,b,u); for(k=1,oo, newxs=Set([]); if(!#xs, return(#allxs)); allxs = setunion(allxs,xs); for(i=1,#xs,u = xs[i]; if(!A209229(u), newxs = setunion([A171462(u)],newxs); newxs = setunion([A335876(u)],newxs))); xs = newxs); }; %Y A335906 Cf. A006530, A171462, A335876, A335905. %K A335906 nonn %O A335906 1,3 %A A335906 _Antti Karttunen_, Jun 30 2020