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 A047988 #18 Jun 06 2020 04:10:48 %S A047988 0,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,2,1,1,1,1,0,1,1,1,1,2,1,1,0,1,1,1, %T A047988 0,1,2,1,0,1,1,2,1,1,1,1,0,1,1,1,1,2,1,1,0,1,2,1,0,1,1,1,0,1,1,2,1,1, %U A047988 1,1,0,1,1,1,2,1,1,1,0,1,1,1,0,1,2,2,1,2,1,1,1,1,1,1,0,1,1,1,1,2 %N A047988 Start with n and reach 2 by repeatedly either dividing by d where d <= the square root or by adding or subtracting 1. The division steps are free, but adding or subtracting 1 costs 1 point. a(n) is the smallest cost to reach 2. %H A047988 David A. Corneth, <a href="/A047988/b047988.txt">Table of n, a(n) for n = 2..10001</a> %H A047988 David A. Corneth, <a href="/A047988/a047988.gp.txt">PARI program</a> %H A047988 Thomas Kantke, <a href="https://www.spektrum.de/magazin/das-spiel-minimum-und-die-zerlegung-natuerlicher-zahlen/820793">Das Spiel Minimum und die Zerlegung natürlicher Zahlen</a>, Mathematische Unterhaltungen, Spectrum der Wissenschaft, April 1993, pp. 11-13. %e A047988 From _David A. Corneth_, Jun 05 2020: (Start) %e A047988 For n = 19 we get to 2 via %e A047988 n := 19 - 1 = 2 (+1 point as we subtract 1 from n) %e A047988 n := 18/3 = 6 (+0 point as we divide by a divisor) %e A047988 n := 6/2 = 3 (+0 point, we divide by a divisor. we can't divide by 3 as 3 > sqrt(6)). %e A047988 n := 3 - 1 = 2 (+1 point; steps end here; we have n = 2) %e A047988 We earned 2 points in these steps. As this is the minimal number of points starting at n = 19, a(19) = 2. (End) %o A047988 (PARI) \\ see Corneth link \\ _David A. Corneth_, Jun 05 2020 %Y A047988 Cf. A047836, A047984, A047985, A047986, A047987. %Y A047988 Cf. A048823, A048824, A048825, A048826, A048827. %K A047988 nonn,easy %O A047988 2,18 %A A047988 Thomas Kantke (bytes.more(AT)ibm.net) %E A047988 More terms from _David W. Wilson_