login
Primes in A065049 which are not in A139370.
1

%I #8 Dec 15 2018 20:44:28

%S 277,337,349,373,853,1093,1109,1117,1237,1297,1301,1303,1361,1367,

%T 1373,1381,1399,1429,1489,1493,1621,1861,1873,1877,1879,2389,3413,

%U 3541,4177,4357,4373,4421,4423,4441,4447,4549,4561,4567,4597,4933,4951,4957,5077,5189,5197,5209,5233,5237

%N Primes in A065049 which are not in A139370.

%C In the notation of A139370, a prime p is in the sequence iff e(p)>o(p) and e(p)-o(p)== 4 or 5 (mod 6). [_Vladimir Shevelev_, Dec 12 2008]

%t aQ[n_] := PrimeQ[n] && EvenQ[Count[IntegerDigits[n, 2], 1]] == OddQ[Mod[n, 3]] && Module[{d = Reverse[IntegerDigits[n, 2]]}, Total@d[[1;; -1;; 2]] >= Total@d[[2;; -1;; 2]]]; Select[Range[5300], aQ] (* _Amiram Eldar_, Dec 15 2018 *)

%o (PARI) isokp(p) = (p>2) && isprime(p) && ((hammingweight(p) % 2) != ((p % 3) % 2)); \\ A065049

%o isok0(n) = {my(irb = Vec(select(x->(x%2), Vecrev(binary(n)), 1))); #select(x->(x%2), irb) < #irb/2;} \\ A139370

%o isok(p) = isokp(p) && !isok0(p); \\ _Michel Marcus_, Dec 15 2018

%Y Cf. A065049, A139370.

%K nonn

%O 1,1

%A _Vladimir Shevelev_, Dec 11 2008, Dec 12 2008

%E Missing 853 and more terms from _Michel Marcus_, Dec 15 2018