Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #21 Feb 27 2020 07:04:43
%S 1,1,1,0,1,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,
%T 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
%U 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
%N Male-female differences: a(n) = A005378(n) - A005379(n).
%C 0 <= a(n) <= 1;
%C for n > 0: a(n) = A010056(n-1), a(A001690(n)-1) = 0, a(A000071(n)) = 1.
%D Hofstadter, "Goedel, Escher, Bach", p. 137.
%H Charles R Greathouse IV, <a href="/A192687/b192687.txt">Table of n, a(n) for n = 0..10000</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/HofstadterMale-FemaleSequences.html">Hofstadter Male-Female Sequences.</a>
%H <a href="/index/Ho#Hofstadter">Index entries for Hofstadter-type sequences</a>
%H <a href="/index/Go#GEB">Index entries for sequences from "Goedel, Escher, Bach"</a>
%o (Haskell)
%o a192687 n = a192687_list !! n
%o a192687_list = zipWith (-) females males where
%o females = 1 : zipWith (-) [1..] (map (males !!) females)
%o males = 0 : zipWith (-) [1..] (map (females !!) males)
%o (PARI) a(n)=my(k=(n+1)^2); k+=(k+1)<<2; issquare(k) || issquare(k-8) \\ _Charles R Greathouse IV_, Nov 07 2014
%Y Cf. A000071, A001690, A005378, A005379, A010056, A104162.
%K nonn,easy
%O 0
%A _Reinhard Zumkeller_, Jul 12 2011