OFFSET
1,2
COMMENTS
If a(n) = m then a(m) = n.
LINKS
MAPLE
s := {seq(i, i=2..2000)}:a[1] := 1:for n from 2 to 120 do l := sort(convert(s, list)): k := 1: while(not isprime(n*l[k]+1)) do k := k+1: if(k>nops(l)) then print("Overflow"):fi:od: a[n] := l[k]:s := s minus {a[n]}:od:seq(a[l], l=1..120); # Sascha Kurz
MATHEMATICA
l = {}; Do[k = 1; While[MemberQ[l, k] || !PrimeQ[n*k + 1], k++ ]; AppendTo[l, k], {n, 100}]; l (* Ryan Propper, Jun 15 2006 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Sep 13 2003
EXTENSIONS
More terms from Sascha Kurz, Sep 22 2003
Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, Jun 09 2007
STATUS
approved