A119718 a(1)=4; thereafter a(n) is the smallest semiprime not yet appearing in the sequence that is relatively prime to a(n-1).
4, 9, 10, 21, 22, 15, 14, 25, 6, 35, 26, 33, 34, 39, 38, 49, 46, 51, 55, 57, 58, 65, 62, 69, 74, 77, 82, 85, 86, 87, 91, 93, 94, 95, 106, 111, 115, 118, 119, 121, 122, 123, 133, 129, 134, 141, 142, 143, 145, 146, 155, 158, 159, 161, 166, 169, 177, 178, 183, 185, 187
Offset: 1
Keywords
Links
- David L. Applegate, Hans Havermann, Bob Selcoe, Vladimir Shevelev, N. J. A. Sloane, and Reinhard Zumkeller, The Yellowstone Permutation, arXiv preprint arXiv:1501.01669, 2015. Also Journal of Integer Sequences, Vol. 18 (2015), Article 15.6.7
Programs
-
Mathematica
sp0=Select[Range[1000],2==Plus@@Last/@FactorInteger@#&]; sp=sp0; le=Length@sp; seq={4}; b=4; sp=Rest@sp; le=le-1; Do[Do[spi=sp[[i]]; If[1==GCD[b,spi],b=spi; AppendTo[seq,b]; sp=Delete[sp,i]; le=le-1; Break[]],{i,le}],{100}]; seq
Extensions
Definition revised by N. J. A. Sloane, Oct 13 2015 at the suggestion of Bob Selcoe.
Comments