OFFSET
0,4
COMMENTS
M(n) is not equal to F(n) if and only if n+1 is a Fibonacci number (A000045); a(n)=A005379(n)-A192687(n). [Reinhard Zumkeller, Jul 12 2011]
REFERENCES
D. R. Hofstadter, "Goedel, Escher, Bach", p. 137.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
D. R. Hofstadter, Eta-Lore [Cached copy, with permission]
D. R. Hofstadter, Pi-Mu Sequences [Cached copy, with permission]
D. R. Hofstadter and N. J. A. Sloane, Correspondence, 1977 and 1991
Simon Plouffe, Approximations de séries génératrices et quelques conjectures, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
Simon Plouffe, 1031 Generating Functions, Appendix to Thesis, Montreal, 1992
J. Shallit, Proving properties of some greedily-defined integer recurrences via automata theory, arXiv:2308.06544 [cs.DM], August 12 2023.
Th. Stoll, On Hofstadter's married functions, Fib. Q., 46/47 (2008/2009), 62-67. - from N. J. A. Sloane, May 30 2009
Eric Weisstein's World of Mathematics, Hofstadter Male-Female Sequences.
FORMULA
F(0) = 1; M(0) = 0; F(n) = n - M(F(n-1)); M(n) = n - F(M(n-1)).
The g.f. -z^2*(-1-z^3-z^6-z-z^4-z^7+z^8)/(z+1)/(z^2+1)/(z^4+1)/(z-1)^2, conjectured by Simon Plouffe in his 1992 dissertation is incorrect: the coefficient of z^33 in the g.f. is 21, but a(33) = 20. (Discovered by Sahand Saba, Jan 14 2013.) - Frank Ruskey, Jan 16 2013
MAPLE
F:= proc(n) option remember; n - M(procname(n-1)) end proc:
M:= proc(n) option remember; n - F(procname(n-1)) end proc:
F(0):= 1: M(0):= 0:
seq(M(n), n=0..100); # Robert Israel, Jun 15 2015
MATHEMATICA
f[0] = 1; m[0] = 0; f[n_] := f[n] = n - m[f[n-1]]; m[n_] := m[n] = n - f[m[n-1]]; Table[m[n], {n, 0, 73}]
(* Jean-François Alcover, Jul 27 2011 *)
PROG
(Haskell) Cf. A005378.
(PARI) f(n) = if(n<1, 1, n - m(f(n - 1)));
m(n) = if(n<1, 0, n - f(m(n - 1)));
for(n=0, 73, print1(m(n), ", ")) \\ Indranil Ghosh, Apr 23 2017
CROSSREFS
KEYWORD
nonn,nice,easy
AUTHOR
EXTENSIONS
More terms from James A. Sellers, Jul 12 2000
Comment corrected by Jaroslav Krizek, Dec 25 2011
STATUS
approved