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 A227930 #42 Jul 24 2023 02:36:43 %S A227930 11,19,47,59,67,79,107,131,179,191,211,227,239,251,271,283,307,331, %T A227930 367,379,419,431,443,463,491,499,563,587,659,719,787,827,859,883,911, %U A227930 947,971,1019,1039,1051,1087,1123,1163,1171,1187,1231,1259,1279,1291,1327,1423,1451,1459,1471,1483 %N A227930 Primes p such that p-1 and p+1 have an even Hamming weight. %C A227930 Primes such that both neighbors are evil (as defined in A001969). %C A227930 From _Antti Karttunen_, Dec 29 2013: (Start) %C A227930 Excluding 2, the intersection of A027697 (Odious primes: primes with odd number of 1's in binary expansion) and A095282 (Primes whose binary-expansion ends with an even number of 1's). %C A227930 Equally, the intersection of A092246 (Odd "odious" numbers) and A095282. %C A227930 Equally, odd odious primes p such that A007814(p+1) is even. %C A227930 (End) %H A227930 Charles R Greathouse IV, <a href="/A227930/b227930.txt">Table of n, a(n) for n = 1..10000</a> %p A227930 read("transforms"): %p A227930 isA000069 := proc(n) %p A227930 if wt(n) mod 2 = 1 then %p A227930 true; %p A227930 else %p A227930 false; %p A227930 end if; %p A227930 end proc: %p A227930 for n from 1 do %p A227930 if isprime(n) and not isA000069(n-1) and not isA000069(n+1) then %p A227930 printf("%d,",n) ; %p A227930 end if; %p A227930 end do: # _R. J. Mathar_, Oct 08 2013 %p A227930 (Scheme, with Antti Karttunen's IntSeq-library, two alternative implementations) %p A227930 (define A227930 (MATCHING-POS 1 1 (lambda (n) (and (even? (A000120 (- n 1))) (even? (A000120 (+ n 1))) (prime? n))))) %p A227930 (define A227930v2 (MATCHING-POS 1 1 (lambda (n) (and (odd? n) (odd? (A000120 n)) (even? (A007814 (+ n 1))) (prime? n))))) # _Antti Karttunen_, Dec 29 2013 %t A227930 Select[Prime[Range[250]], And @@ EvenQ[DigitCount[# + {-1, 1}, 2, 1]] &] (* _Amiram Eldar_, Jul 24 2023 *) %o A227930 (PARI) is(n)=hammingweight(n-1)%2==0 && hammingweight(n+1)%2==0 && isprime(n) \\ _Charles R Greathouse IV_, Oct 09 2013 %Y A227930 Subsequence of A002145. %Y A227930 Cf. A000069, A001969, A007814, A027697, A092246, A095282. %Y A227930 Seems to consist of all primes in A233388. %K A227930 nonn,base,easy %O A227930 1,1 %A A227930 _Juri-Stepan Gerasimov_, Oct 06 2013 %E A227930 Entries checked by _R. J. Mathar_, Oct 08 2013