OFFSET
1,2
COMMENTS
For n>=3, using Wilson's theorem, a(n)=a(n-1)+ (-1)^r*gcd(a(n-1), W), where W = A038507(a(n-1)-1), and r=1 if gcd(a(n-1),W) = 1 and r=0 otherwise. - Vladimir Shevelev, Aug 07 2009
MAPLE
a[1]:=1: a[2]:=2: for n from 3 to 60 do if isprime(a[n-1])=true then a[n]:=2*a[n-1] else a[n]:=a[n-1]-1 fi od: seq(a[n], n=1..60); - Emeric Deutsch, Apr 02 2006
CROSSREFS
KEYWORD
nonn
AUTHOR
Rodolfo Kurchan, Mar 26 2006
EXTENSIONS
More terms from Emeric Deutsch, Apr 02 2006
STATUS
proposed