OFFSET
1,2
EXAMPLE
a(3)=2 because A097465(2)=3.
MAPLE
A:=proc(n) option remember; local t, S; S:=({$1..1000} minus {seq(A(i), i=1..n-1)}) minus {A(n-1)-1, A(n-1)+1}; t:=min(S[]); while igcd(A(n-1), t)>1 do S:=S minus {t}; t:=min(S[]) od; t end: A(1):=1: L:=[seq(A(n), n=1..200)]: a:=n-> if member(n, L, 'p') then p else 0 fi: seq(a(n), n=1..195);
CROSSREFS
KEYWORD
nonn
AUTHOR
Alec Mihailovs (alec(AT)mihailovs.com), Aug 23 2004
STATUS
approved