

A122397


a(1)=1, a(2)=2, a(3)=3; for n >= 4, a(n) is the smallest positive integer not occurring earlier in the sequence such that gcd(a(n2), a(n)) is a prime.


1



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



OFFSET

1,2


COMMENTS

Sequence is probably a permutation of the positive integers.


LINKS

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


MATHEMATICA

f[s_] := Block[{k = 1}, While[MemberQ[s, k]  ! PrimeQ[GCD[s[[ 2]], k]], k++ ]; Append[s, k] ]; Nest[f, {1, 2, 3}, 70] (* Ray Chandler, Sep 05 2006 *)


CROSSREFS

Cf. A122398.
Sequence in context: A294688 A094859 A267102 * A339670 A047417 A066936
Adjacent sequences: A122394 A122395 A122396 * A122398 A122399 A122400


KEYWORD

nonn


AUTHOR

Leroy Quet, Aug 31 2006


EXTENSIONS

Corrected and extended by Ray Chandler, Sep 05 2006


STATUS

approved



