This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A242965 #20 Dec 12 2024 02:52:00 %S A242965 3,4,5,7,8,11,16,17,19,29,43,47,61,64,71,79,89,101,107,109,151,191, %T A242965 197,223,251,271,317,349,359,421,439,461,521,569,601,631,659,673,691, %U A242965 701,719,811,821,881,911,919,947,971,991,1009,1024,1051,1091,1109,1153 %N A242965 Numbers whose anti-divisors are all primes. %H A242965 Paolo P. Lava, <a href="/A242965/b242965.txt">Table of n, a(n) for n = 1..1000</a> %e A242965 The anti-divisors of 191 are all primes: 2, 3, 127. %e A242965 The same for 1024: 3, 23, 89, 683. %p A242965 P := proc(q) local k,ok,n; for n from 3 to q do ok:=1; %p A242965 for k from 2 to n-1 do if abs((n mod k)-k/2)<1 then %p A242965 if not isprime(k) then ok:=0; break; fi; fi; od; %p A242965 if ok=1 then print(n); fi; od; end: P(10^3); %o A242965 (Python) %o A242965 from sympy import divisors, isprime %o A242965 for n in range(3, 10**4): %o A242965 for d in [2*d for d in divisors(n) if n > 2*d and n % (2*d)] + \ %o A242965 [d for d in divisors(2*n-1) if n > d >= 2 and n % d] + \ %o A242965 [d for d in divisors(2*n+1) if n > d >= 2 and n % d]: %o A242965 if not isprime(d): %o A242965 break %o A242965 else: %o A242965 print(n, end=', ') %o A242965 # _Chai Wah Wu_, Aug 15 2014 %Y A242965 Cf. A066272, A242966. %K A242965 nonn,easy %O A242965 1,1 %A A242965 _Paolo P. Lava_, May 28 2014