

A125065


a(1)=1. a(n) is the smallest positive integer not occurring earlier in the sequence such that a(n)/gcd(a(n), a(n1)) is not a prime.


0



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



OFFSET

1,2


COMMENTS

Sequence is a permutation of the positive integers.


LINKS

Table of n, a(n) for n=1..72.


EXAMPLE

a(22) = 27 because 27 is the smallest positive integer not occurring among the first 21 terms of the sequence such that a(22)/gcd(a(22), a(21)) = 27/gcd(27, 24) = 9 is not a prime.
a(8) = 5 because 5 is the smallest positive integer not occurring among the first 7 terms of the sequence such that a(8)/gcd(a(8), a(7)) = 5/gcd(5, 10) = 1 is not a prime.


MATHEMATICA

f[l_List] := Block[{k = 1}, While[MemberQ[l, k]  PrimeQ[k/GCD[k, l[[ 1]]]], k++ ]; Append[l, k]]; Nest[f, {1}, 72] (* Ray Chandler, Feb 13 2007 *)


CROSSREFS

Sequence in context: A143942 A265291 A195777 * A109816 A296477 A292964
Adjacent sequences: A125062 A125063 A125064 * A125066 A125067 A125068


KEYWORD

nonn


AUTHOR

Leroy Quet, Jan 09 2007


EXTENSIONS

Extended by Ray Chandler, Feb 13 2007


STATUS

approved



