

A082746


For n odd, a(n) is the least positive integer not already used. For n even, a(n) is the least positive integer not already used that is coprime to a(n/2).


3



1, 2, 3, 5, 4, 7, 6, 8, 9, 11, 10, 12, 13, 17, 14, 15, 16, 19, 18, 20, 21, 23, 22, 25, 24, 27, 26, 28, 29, 31, 30, 32, 33, 35, 34, 36, 37, 41, 38, 39, 40, 43, 42, 44, 45, 47, 46, 48, 49, 53, 50, 52, 51, 55, 54, 57, 56, 59, 58, 60, 61, 67, 62, 63, 64, 65, 66, 68, 69, 71, 70, 73
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

a(4) = 5 is coprime to a(8) = 8.  David Wasserman, Sep 28 2004


LINKS

Rémy Sigrist, Table of n, a(n) for n = 1..10000


PROG

(PARI) used = vector(100); A = vector(80); least = 1; for (i = 1, 40, while (used[least], least = least + 1); A[i + i  1] = least; used[least] = 1; m = least + 1; while (used[m]  gcd(m, A[i]) > 1, m = m + 1); A[i + i] = m; used[m] = 1); A


CROSSREFS

Sequence in context: A340477 A340401 A160051 * A098313 A098311 A342265
Adjacent sequences: A082743 A082744 A082745 * A082747 A082748 A082749


KEYWORD

nonn


AUTHOR

Amarnath Murthy, Apr 16 2003


EXTENSIONS

More terms from David Wasserman, Sep 28 2004


STATUS

approved



