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 A157970 #28 Jun 16 2025 08:44:47 %S A157970 5,9,17,23,29,33,39,45,53,57,65,71,77,85,89,95,101,105,113,119,125, %T A157970 129,135,141,149,153,159,165,169,177,183,189,197,201,209,215,221,225, %U A157970 231,237,245,249,257,263,269,277,281,287,293,297 %N A157970 Evil twin locations: first members of pairs of consecutive evil numbers. %C A157970 An evil number (A001969) is a nonnegative integer with an even number of ones in its binary expansion. %C A157970 In the reference it is shown that these evil twins alternate with the odious twins (see A157971), which are pairs of consecutive odious numbers (A000069). %H A157970 Amiram Eldar, <a href="/A157970/b157970.txt">Table of n, a(n) for n = 1..10000</a> %H A157970 Chris Bernhardt, <a href="https://pdfslide.net/documents/evil-twins-alternate-with-odious-twins-fairfield-twinspdf-evil-twins-alternate.html">Evil twins alternate with odious twins</a>, Math. Mag. 82 (2009), pp. 57-62; also on <a href="https://www.jstor.org/stable/27643161">JSTOR</a>. %H A157970 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/OdiousNumber.html">Odious Number</a>. %F A157970 a(n) = A248056(n) - 1. - _Amiram Eldar_, Jun 16 2025 %e A157970 The sequence of evil numbers (A001969) begins 0,3,5,6,9,10,12,15,17,18,20,..., so the first few evil twins are 5, 9, 17, ... . %t A157970 SequencePosition[Table[If[EvenQ[DigitCount[n, 2, 1]], 1, 0], {n, 300}], {1, 1}][[All, 1]] (* _Amiram Eldar_, Dec 09 2019 after _Harvey P. Dale_ at A157971 *) %o A157970 (PARI) lista(nn) = select(n->(!(hammingweight(n) % 2) && !(hammingweight(n+1) % 2)), vector(nn, i, i)); \\ _Michel Marcus_, Jul 10 2014 %Y A157970 Cf. A000069, A001969, A157971, A248056. %K A157970 nonn,easy %O A157970 1,1 %A A157970 _John W. Layman_, Mar 10 2009