A257312 a(1) = 6; a(2) = 7; for n > 2, a(n) is the smallest number of the form prime + 4 not already used which shares a factor with a(n-1).
6, 7, 21, 9, 15, 27, 33, 11, 77, 35, 45, 51, 17, 153, 57, 63, 75, 65, 105, 87, 93, 111, 117, 135, 141, 47, 423, 171, 177, 183, 195, 143, 231, 161, 23, 437, 285, 155, 185, 215, 245, 203, 261, 201, 237, 243, 255, 267, 273, 287, 41, 861, 297, 275, 315, 321, 107
Offset: 1
Keywords
Links
- Peter J. C. Moses, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
f[n_] := Block[{o = 2^2, s, p, k}, s = {o + 2, o + 3}; For[k = 3, k <= n, k++, p = 2; While[GCD[p + o, s[[k - 1]]] == 1 || MemberQ[s, p + o], p = NextPrime@ p]; AppendTo[s, p + o]]; s]; f@ 57 (* Michael De Vlieger, Apr 20 2015 *)
Extensions
More terms from Peter J. C. Moses, Apr 20 2015
Comments