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 A168007 #46 Mar 15 2023 04:13:43 %S A168007 1,2,4,3,6,5,10,9,12,11,22,21,24,23,46,45,48,47,94,93,96,95,100,99, %T A168007 102,101,202,201,204,203,210,209,220,219,222,221,234,233,466,465,468, %U A168007 467,934,933,936,935,940,939,942,941,1882,1881,1884,1883,1890,1889,3778,3777,3780,3779,7558,7557,7560,7559 %N A168007 Jumping divisor sequence (see Comments lines for definition). %C A168007 Consider the diagram with overlapping periodic curves that appears in the Links section (figure 2). The number of curves that contain the point [n,0] equals the number of divisors of n. The curve of diameter d represents the divisor d of n. Now consider only the lower part of the diagram (figure 3). Starting from point [1,0] we continue our journey walking along the semicircumference with smallest diameter not used previously (see the illustration of initial terms, figure 1). The sequence is formed by the values of n where the trajectory intercepts the x axis. - _Omar E. Pol_, Jan 14 2019 %H A168007 Jinyuan Wang, <a href="/A168007/b168007.txt">Table of n, a(n) for n = 1..1000</a> %H A168007 Omar E. Pol, <a href="http://www.polprimos.com/imagenespub/poldiv09.jpg">Illustration of initial terms (Fig. 1)</a> %H A168007 Omar E. Pol, <a href="http://www.polprimos.com/imagenespub/poldiv01.jpg">Periodic curves and tau(n) (Fig. 2)</a> %H A168007 Omar E. Pol, <a href="http://www.polprimos.com/imagenespub/poldiv03.jpg">Periodic curves and tau(n), lower part upside down (Fig. 3)</a> %F A168007 a(1) = 1; if a(n) is an even composite number then a(n+1) = a(n) - 1; otherwise a(n+1) = a(n) + A020639(a(n)). - _Omar E. Pol_, Jan 13 2019 %o A168007 (PARI) lista(nn) = {my(v=vector(nn, i, if(i<4, 2^i/2))); for(n=4, nn, if(v[n-1]%2, v[n]=v[n-1] + factor(v[n-1])[1, 1], v[n]=v[n-1] - 1)); v; } \\ _Jinyuan Wang_, Mar 14 2020 %o A168007 (Python) %o A168007 from itertools import count, islice %o A168007 from sympy import primefactors %o A168007 def A168007_gen(): # generator of terms %o A168007 yield (a := 1) %o A168007 for n in count(2): %o A168007 yield (a:=a+(min(primefactors(a),default=1) if a&1 or a==2 else -1)) %o A168007 A168007_list = list(islice(A168007_gen(),20)) # _Chai Wah Wu_, Mar 14 2023 %Y A168007 Cf. A000005, A002808, A020639, A004280, A168008, A168009. %K A168007 nonn,easy %O A168007 1,2 %A A168007 _Omar E. Pol_, Nov 19 2009 %E A168007 More terms from _Omar E. Pol_, Jan 12 2019