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 A227891 #52 Dec 23 2024 14:53:43 %S A227891 1,9,25,289,441,529,625,841,1849,2809,3249,5041,6889,7225,7569,7921, %T A227891 10201,12769,15129,15625,19321,21025,22201,26569,31329,38809,46225, %U A227891 48841,53361,55225,66049,69169,72361,76729,78961,83521,85849,93025,96721,100489,103041 %N A227891 Numbers for which the number of odious proper divisors (A000069) equals the number of evil proper divisors (A001969). %C A227891 All terms are odd squares (see Shevelev links). %H A227891 Donovan Johnson, <a href="/A227891/b227891.txt">Table of n, a(n) for n = 1..1000</a> %H A227891 Vladimir Shevelev, <a href="https://web.archive.org/web/*/http://list.seqfan.eu/oldermail/seqfan/2013-October/011800.html">A set of sequences of perfect squares</a>. %H A227891 Vladimir Shevelev, <a href="https://web.archive.org/web/*/http://list.seqfan.eu/oldermail/seqfan/2013-October/011804.html">A question of Donovan Johnson</a>. %F A227891 Common value for numbers of considered divisors is (A000005(a(n))-1)/2. %e A227891 1 has no proper divisors, so it is in the sequence. %e A227891 9 has two proper divisors 1 (odious) and 3 (evil). Thus 9 is in the sequence. %t A227891 isQ[n_] := Sum[Switch[Mod[Total[IntegerDigits[d, 2]], 2], 0, 1, 1, -1], {d, Most[Divisors[n]]}] == 0; Select[(2*Range[200]-1)^2, isQ] (* _Jean-François Alcover_, Dec 04 2015 *) %o A227891 (PARI) is(n)=sumdiv(n,d,(-1)^hammingweight(d))==(-1)^hammingweight(n) %o A227891 select(is, vector(10^4,i,(2*i-1)^2)) \\ _Charles R Greathouse IV_, Oct 26 2013 %o A227891 (PARI) c=0; forstep(i=1, 8135, 2, n=i^2; nd=numdiv(n); d=divisors(n); ce=0; co=0; for(j=1, nd-1, if(hammingweight(d[j])%2==0, ce++, co++)); if(ce==co, c++; write("b227891.txt", c " " n))) \\ _Donovan Johnson_, Oct 30 2013 %Y A227891 Cf. A000005, A227872, A227873, A227889, A000069, A001969. %K A227891 base,nonn %O A227891 1,2 %A A227891 _Vladimir Shevelev_ and _Peter J. C. Moses_, Oct 26 2013