OFFSET
1,2
COMMENTS
Sequence is a permutation of the positive integers.
Cycles (including fixed points) with elements <= 200000 are (1), (2), (3), (4), (5,6,7,9,8), (10), (12,19,17,15), (72), (94,123,113,103), (160,314,521,1867,2677,1003,882,762,528,633,312,207), (400,457,646), (5096,8269,10609,9322), (93388,100549).
LINKS
EXAMPLE
n = 11, prime(11)+1 = 32, numbers not occurring up to a(10) are 11, 12, 13, 14, 15, 16, 17, ... . The smallest one that divides 32 is 16, hence a(11) = 16.
PROG
(PARI) {m=71; w=vectorsmall(3*m); for(n=1, m, k=1; while(w[k]||(prime(n)+1)%k>0, k++); print1(k, ", "); w[k]=1)}
CROSSREFS
KEYWORD
nonn
AUTHOR
Klaus Brockhaus, Sep 14 2007
STATUS
approved