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 A180625 #10 Nov 21 2013 12:50:05 %S A180625 2,4,3,6,5,10,9,7,14,13,26,25,21,19,38,37,74,73,146,145,141,139,278, %T A180625 277,554,553,547,1094,1093,2186,2185,2181,2179,4358,4357,8714,8713, %U A180625 17426,17425,17421,17419,34838,34837,34827 %N A180625 a(1) = 2; a(n) is twice the previous term if it is prime, otherwise the previous term minus its lowest prime factor plus one. %H A180625 Harvey P. Dale, <a href="/A180625/b180625.txt">Table of n, a(n) for n = 1..1000</a> %e A180625 2 is prime; 2 * 2 = 4. 4 is composite; 4 - lpf(4) + 1 = 4 - 2 + 1 = 3. 3 is prime; 3 * 2 = 6. 6 is composite; 6 - lpf(6) + 1 = 6 - 2 + 1 = 5. %t A180625 Join[{s=2}, Table[If[PrimeQ[s], s=2s, s=s-FactorInteger[s][[1,1]]+1]; s, {43}]] %t A180625 NestList[If[PrimeQ[#],2#,#-FactorInteger[#][[1,1]]+1]&,2,50] (* _Harvey P. Dale_, May 02 2012 *) %Y A180625 Cf. A020639. %K A180625 nonn %O A180625 1,1 %A A180625 _Grant Garcia_, Jan 21 2011