OFFSET
1,1
COMMENTS
Define f(1) = 0. For n>=2, let f(n) = n - p where p is the largest prime <= n. A072491(n) = number of iterations of f to reach 0, starting from n.
p+4 is a term if p is a prime but p+2 and p+4 are both composite.
EXAMPLE
27 is a term as f(27)=27-23=4, f(4)=4-3=1 and f(1) = 0. (3 steps.)
MATHEMATICA
f[1]=0; f[n_] := n-Prime[PrimePi[n]]; a72491[n_] := Module[{k, x}, For[k=0; x=n, x>0, k++; x=f[x], Null]; k]; Select[Range[300], a72491[ # ]==3&]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amarnath Murthy, Jul 14 2002
EXTENSIONS
Edited by Dean Hickerson, Nov 26 2002
STATUS
approved