%I M0194 #25 Sep 04 2019 08:06:42
%S 1,1,1,2,2,1,2,1,2,2,2,2,1,4,2,1,2,2,4,1,4,2,2,2,2,2,2,4,1,2,1,2,2,2,
%T 4,2,1,2,2,4,4,1,4,4,1,2,2,4,4,1,2,1,4,2,2,2,2,4,2,2,2,2,4,1,8,2,1,2,
%U 4,2,2,4,2,2,2,2,2,1,4,4,1,4,2,2,4,1,4,2,2,4,2,2,1,4,2,2,2,2,4,1,8,2,1,4,2
%N Number of genera of Q(sqrt(-n)), n squarefree.
%D D. A. Buell, Binary Quadratic Forms. Springer-Verlag, NY, 1989, pp. 224-241.
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H Andrew Howroyd, <a href="/A003643/b003643.txt">Table of n, a(n) for n = 1..1000</a>
%H <a href="/index/Qua#quadfield">Index entries for sequences related to quadratic fields</a>
%F a(n) = 2^(omega(A033197(n)) - 1). - _Andrew Howroyd_, Jul 24 2018
%F Let k = A005117(n) be the n-th squarefree number, then a(n) = 2^omega(k) if k == 1 (mod 4) and 2^(omega(k) - 1) otherwise. - _Jianing Song_, Jul 25 2018
%t Function[If[Mod[#, 4] == 1, 2^PrimeOmega[#], 2^(PrimeOmega[#] - 1)]] /@ Select[Range[200], SquareFreeQ] (* _Jean-François Alcover_, Sep 04 2019 *)
%o (PARI) for(n=1, 200, if(issquarefree(n), print1(2^(omega(n*if((-n)%4>1, 4, 1)) - 1), ", "))) \\ _Andrew Howroyd_, Jul 24 2018
%Y Cf. A000924, A001221 (omega), A005117, A033197, A003640.
%K nonn,nice
%O 1,4
%A _N. J. A. Sloane_, _Mira Bernstein_