OFFSET
1,2
COMMENTS
This is a permutation of the positive integers.
1, 2, 6, 9, 15, 19, ... are in a(n) and A064664(n).
LINKS
Jean-François Alcover, Table of n, a(n) for n = 1..1000
Jean-François Alcover, Plot of a(1..1000)
FORMULA
Interleave the occurrences in A164912.
MATHEMATICA
nmax = 120;
ekg[n_] := ekg[n] = Module[{ee, k}, If[n <= 2, n, ee = Array[ekg, n - 1]; For[k = 1, True, k++, If[FreeQ[ee, k] && GCD[ekg[n - 1], k] != 1, Return[k]]]]];
b[n_] := Quotient[ekg[n] - 1, 2] + 1;
bb = Array[b, nmax];
TakeWhile[Table[Position[bb, n], {n, 1, nmax}], Length[#] == 2&] // Flatten (* Jean-François Alcover, Nov 21 2021 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul Curtz, Nov 21 2021
STATUS
approved