OFFSET
1,1
LINKS
Paolo P. Lava, Table of n, a(n) for n = 1..1000
EXAMPLE
The anti-divisors of 191 are all primes: 2, 3, 127.
The same for 1024: 3, 23, 89, 683.
MAPLE
P := proc(q) local k, ok, n; for n from 3 to q do ok:=1;
for k from 2 to n-1 do if abs((n mod k)-k/2)<1 then
if not isprime(k) then ok:=0; break; fi; fi; od;
if ok=1 then print(n); fi; od; end: P(10^3);
PROG
(Python3)
from sympy import divisors, isprime
for n in range(3, 10**4):
for d in [2*d for d in divisors(n) if n > 2*d and n % (2*d)] + \
[d for d in divisors(2*n-1) if n > d >= 2 and n % d] + \
[d for d in divisors(2*n+1) if n > d >= 2 and n % d]:
if not isprime(d):
break
else:
print(n, end=', ')
# Chai Wah Wu, Aug 15 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paolo P. Lava, May 28 2014
STATUS
approved