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 A232667 #39 Oct 21 2016 12:34:33 %S A232667 2,7,19,31,37,79,97,157,199,211,229,271,307,331,367,379,439,499,577, %T A232667 601,607,661,727,829,877,967,997,1009,1069,1171,1279,1459,1531,1609, %U A232667 1627,1657,1759,1867,2011,2029,2131,2137,2311,2551,2557,3037,3061,3109,3169,3181 %N A232667 Primes p such that the p-th odious number is prime; odious primes p such that 2p-1 is prime. %C A232667 From _Antti Karttunen_, Nov 29 & 30 2013: (Start) %C A232667 This sequence is the intersection of A005382 and A027697. %C A232667 Proof: %C A232667 A000069(n) reduces according to the bit parity of n-1 as follows: %C A232667 A000069(n) = 2n - 2 when n-1 is odious. %C A232667 A000069(n) = 2n - 1 when n-1 is evil. %C A232667 which means that no prime in this sequence can be evil, as then p-1 would be an odious number (true for all odd primes) and A000069(p) would be 2(p-1) which obviously cannot be a prime, contradicting the requirement. Thus all primes present must belong to the set of odious primes, A027697. %C A232667 As each prime p here is thus odious, it means that each p-1 is an evil number (A001969), and thus A000069(p) = 2p-1. And the stipulation that it also must be prime, is just what is required from the terms of A005382. Thus this sequence contains exactly those primes that occur in both A005382 and A027697. %C A232667 Equally: this is the intersection of A000069 and A005382, thus prime p occurs here iff A000120(p) is odd and 2p-1 is prime also. %C A232667 Also, apart from the first term (2), all the primes (2*a(n))-1 are also odious. This follows because for any odd number k, A000120(2k-1) = A000120(k). %C A232667 (End) %H A232667 Antti Karttunen, <a href="/A232667/b232667.txt">Table of n, a(n) for n = 1..225</a> %e A232667 7 is a prime and A000069(7) = 13, a prime also, thus 7 is in this sequence. %e A232667 19 is a prime and A000069(19) = 37, a prime also, thus 19 is in this sequence. %e A232667 Alternatively: %e A232667 7 is a prime, 2*7-1 = 13 is also prime, and when written in binary, 7 = '111', with an odd number of 1-bits. Thus 7 is included in this sequence. %e A232667 The next time this happens, is for 19, as it is a prime, 2*19-1 = 37 is also prime, and when written in binary, 19 = '10011', also has on odd number of 1-bits. %o A232667 (Scheme, with _Antti Karttunen_'s IntSeq-library and Aubrey Jaffer's SLIB-library) %o A232667 (require 'factor) ;; Includes predicate prime? from SLIB-library. %o A232667 ;; Implementation based on the original definition: %o A232667 (define A232667 (COMPOSE A000040 (MATCHING-POS 1 1 (lambda (k) (prime? (A000069 (A000040 k))))))) %o A232667 ;; Alternative implementation based on the other definition: %o A232667 (define A232667 (MATCHING-POS 1 1 (lambda (n) (and (odd? (A000120 n)) (prime? n) (prime? (- (* 2 n) 1)))))) %Y A232667 Cf. A000040, A000069, A001969, A000120, A005382, A027697, A092246, A232637. %K A232667 nonn %O A232667 1,1 %A A232667 _Juri-Stepan Gerasimov_, Nov 27 2013 %E A232667 Edited and erroneous terms removed by _Antti Karttunen_, Nov 29-30 2013