OFFSET
1,2
COMMENTS
n is in the sequence if y = (xn+1)/(x+n) is noninteger for all integer x where 1 < x < n. Equivalently, n is in the sequence when n cannot be formed by (xy-1)/(x-y) for all integers x and y where x < n and 1 < y < x, so n cannot satisfy ((n+1)/(n-1))*((x+1)/(x-1)) = ((y+1)/(y-1)). Thus all the nearest neighbors of the primes (A045718) appear in this sequence.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Paul D. Hanna)
PROG
(PARI) for(n=1, 150, x=1; b=0; while(x<n, x=x+1; r=(x+n)*floor((x*n+1)/(x+n)); if(r>=(x *n+1), b=b+1)); if(b<=0, print1(n, ", ")))
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Jun 12 2003
STATUS
approved