cp's OEIS Frontend

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.

A131122 Even numbers that are not the sum of an evil prime (A027699) and an odious prime (A027697).

This page as a plain text file.
%I A131122 #18 Oct 15 2018 02:52:38
%S A131122 2,4,6,8,20,26,32,38,68,86,92,98,128,164,188,278,302,512,2048,8192,
%T A131122 32768,131072,524288,2097152,8388608,33554432,134217728,536870912
%N A131122 Even numbers that are not the sum of an evil prime (A027699) and an odious prime (A027697).
%C A131122 Every power of 2 with an odd exponent is a term.
%C A131122 Every pair of primes that sum to 4^k, with k > 1, consists of an evil prime and an odious prime. The smallest example is 16 = 3+13 = 5+11; 3 and 5 are evil, 11 and 13 are odious.
%e A131122 32 is here because 32 = 3+29 = 13+19, 3 and 29 are both odious, and 13 and 19 are both evil.
%o A131122 (PARI) isok(n) = {if ((n % 2) == 0, forprime(p=3, n, if ((norml2(binary(p))%2==1) && (isprime(q=n-p)) && (!bittest(norml2(binary(q)), 0)), return (0));); return (1);); return(0);}
%o A131122 lista(nn) = forstep(n=2, nn, 2, if (isok(n), print1(n, ", "))); \\ _Michel Marcus_, Oct 14 2018
%Y A131122 Cf. A004171 (odd powers of 2), A027697, A027699.
%K A131122 nonn,more
%O A131122 1,1
%A A131122 _T. D. Noe_, Jun 15 2007
%E A131122 a(23)-a(28) from _Michel Marcus_, Oct 14 2018