McCarthy 91-Function

Author

Eric W. Weisstein
September 29, 2005

This notebook downloaded from http://mathworld.wolfram.com/notebooks/IntegerSequences/McCarthy91-Function.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/McCarthy91-Function.html.

©2005 Wolfram Research, Inc. except for portions noted otherwise

Code

McCarthyM[n_Integer/;n>100]:=McCarthyM[n]=n-10
McCarthyM[n_Integer/;n<=100]:=McCarthyM[n]=McCarthyM[McCarthyM[n+11]]

Plot

<<Utilities`Plot`

IntegerListPlot[McCarthyM/@Range[120],PlotRange->{{.6,120},{80,110}},
AxesLabel->TraditionalForm/@{n,M[n]}]

Enumeration

McCarthyM/@Range[110]

Position[%,_?(#≠91&),{1},1]