login
Composite numbers whose anti-divisors are all primes.
3

%I #26 Mar 31 2015 03:59:00

%S 4,8,16,64,1024,4096,65536,262144,4194304,1073741824,

%T 1152921504606846976,1267650600228229401496703205376,

%U 85070591730234615865843651857942052864,93536104789177786765035829293842113257979682750464

%N Composite numbers whose anti-divisors are all primes.

%C It appears they are all powers of 2.

%C Subset of A242965.

%C a(n) must be 2^k. - _Hiroaki Yamanouchi_, Mar 17 2015

%C The exponents are 2, 3, 4, 6, 10, 12, 16, 18, 22, 30, 60, 100, 126, 166, 198, ... - _Michel Marcus_, Mar 18 2015

%H Hiroaki Yamanouchi, <a href="/A242966/b242966.txt">Table of n, a(n) for n = 1..15</a>

%e The anti-divisors of 1024 are all primes: 3, 23, 89, 683.

%e The same for 65536: 3, 43691.

%p P := proc(q) local k,ok,n; for n from 3 to q do if not isprime(n)

%p then ok:=1; for k from 2 to n-1 do if abs((n mod k)-k/2)<1

%p then if not isprime(k) then ok:=0; break; fi; fi; od;

%p if ok=1 then print(n); fi; fi; od; end: P(10^100);

%t antiDivisors[n_] := Cases[Range[2, n - 1], _?(Abs[Mod[n, #] - #/2] < 1 &)]; Select[2^Range[2, 20], AllTrue[antiDivisors@ #, PrimeQ] &] (* _Michael De Vlieger_, Mar 18 2015 *)

%o (Python)

%o from sympy import isprime, divisors

%o A242966 = [n for n in range(3,10**5) if not isprime(n) and list(filter(lambda x: not isprime(x), [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])) == []]

%o # _Chai Wah Wu_, Aug 13 2014

%Y Cf. A066272, A242965.

%K nonn

%O 1,1

%A _Paolo P. Lava_, May 28 2014

%E a(11)-a(14) from _Hiroaki Yamanouchi_, Mar 17 2015