login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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(n-2), a(n)) is a prime. 2
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
MAPLE
A[1]:= 1: A[2]:= 2: A[3]:= 3:
S:= {$4..500}:
for n from 4 do
P:= numtheory:-factorset(A[n-2]);
for s in S do
if member(igcd(s, A[n-2]), P) then
A[n]:= s; S:= S minus {s}; break
fi
od;
if not assigned(A[n]) then break fi
od:
seq(A[i], i=1..n-1); # Robert Israel, Jan 04 2023
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 * A359679 A339670 A353562
KEYWORD
nonn,look
AUTHOR
Leroy Quet, Aug 31 2006
EXTENSIONS
Corrected and extended by Ray Chandler, Sep 05 2006
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 05:56 EDT 2024. Contains 371964 sequences. (Running on oeis4.)