OFFSET
1,2
COMMENTS
All terms are odd squares (see Shevelev links).
LINKS
Donovan Johnson, Table of n, a(n) for n = 1..1000
Vladimir Shevelev, A set of sequences of perfect squares.
Vladimir Shevelev, A question of Donovan Johnson.
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
Vladimir Shevelev and Peter J. C. Moses, Oct 26 2013
STATUS
approved