A263648 a(1)=4, a(2)=9: a(n) is the smallest semiprime not yet appearing in the sequence which is coprime to a(n-1) and not coprime to a(n-2).
4, 9, 10, 21, 22, 15, 14, 25, 6, 35, 26, 49, 34, 77, 38, 33, 46, 39, 58, 51, 62, 57, 74, 69, 82, 87, 86, 93, 94, 111, 106, 123, 118, 129, 122, 141, 134, 159, 142, 177, 146, 183, 158, 201, 166, 213, 178, 219, 194, 237, 202, 249, 206, 267, 214, 291, 218, 303, 226, 309
Offset: 1
Keywords
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..10000
- David L. Applegate, Hans Havermann, Bob Selcoe, Vladimir Shevelev, N. J. A. Sloane, and Reinhard Zumkeller, The Yellowstone Permutation, arXiv preprint arXiv:1501.01669 [math.NT], 2015. Also Journal of Integer Sequences, Vol. 18 (2015), Article 15.6.7
- Michael De Vlieger, Annotated scatterplot of (n, k), where k is the position of a(n) in A001358, for n = 1..48. Color code: even a(n) in red, 3 | a(n) in blue, 6 | a(n) in purple, else black.
- Michael De Vlieger, Log-log scatterplot of a(n), n = 1..2^18, showing even terms in red, 3 | a(n) in blue, 6 | a(n) in purple, else black. The first 15 terms are labeled.
Crossrefs
Programs
-
Mathematica
a[1]=4; a[2]=9; a[n_] := a[n] = Module[{k}, For[k=6, True, k++, If[MatchQ[ FactorInteger[k], {{, 1}, {, 1}}|{{, 2}}] && FreeQ[Array[a, n-1], k] && CoprimeQ[k, a[n-1]] && !CoprimeQ[k, a[n-2]], Return[k]]]]; Array[a, 60] (* _Jean-François Alcover, Oct 06 2018 *)
Formula
For n >= 15:
a(n) = 2*prime((n+1)/2) when n is odd;
a(n) = 3*prime(n/2-3) when n is even.
Extensions
More terms from Jean-François Alcover, Oct 06 2018
Comments