login
A227891
Numbers for which the number of odious proper divisors (A000069) equals the number of evil proper divisors (A001969).
8
1, 9, 25, 289, 441, 529, 625, 841, 1849, 2809, 3249, 5041, 6889, 7225, 7569, 7921, 10201, 12769, 15129, 15625, 19321, 21025, 22201, 26569, 31329, 38809, 46225, 48841, 53361, 55225, 66049, 69169, 72361, 76729, 78961, 83521, 85849, 93025, 96721, 100489, 103041
OFFSET
1,2
COMMENTS
All terms are odd squares (see Shevelev links).
LINKS
FORMULA
Common value for numbers of considered divisors is (A000005(a(n))-1)/2.
EXAMPLE
1 has no proper divisors, so it is in the sequence.
9 has two proper divisors 1 (odious) and 3 (evil). Thus 9 is in the sequence.
MATHEMATICA
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 *)
PROG
(PARI) is(n)=sumdiv(n, d, (-1)^hammingweight(d))==(-1)^hammingweight(n)
select(is, vector(10^4, i, (2*i-1)^2)) \\ Charles R Greathouse IV, Oct 26 2013
(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
CROSSREFS
KEYWORD
base,nonn
AUTHOR
STATUS
approved