login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A087559
Rearrangement of natural numbers such that n*a(n) + 1 is a prime.
3
1, 2, 4, 3, 6, 5, 10, 9, 8, 7, 18, 13, 12, 14, 16, 15, 24, 11, 22, 20, 26, 19, 30, 17, 28, 21, 34, 25, 32, 23, 36, 29, 40, 27, 42, 31, 48, 39, 38, 33, 56, 35, 46, 47, 50, 43, 44, 37, 52, 45, 60, 49, 66, 54, 58, 41, 68, 55, 62, 51, 70, 59, 74, 67, 86, 53, 64, 57, 72, 61, 98, 69
OFFSET
1,2
COMMENTS
k pertaining to A111296. {A111296(n)-1}/n.
If a(n) = m then a(m) = n.
a(a(n)) = n; a(A131221(n)) = A131221(n). - Reinhard Zumkeller, Jun 18 2007
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
Cf. A111296.
Sequence in context: A132340 A132666 A116533 * A193298 A168007 A359114
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