OFFSET
1,3
COMMENTS
The smallest value of n such that a(n) = 6 is n = 417.
EXAMPLE
To compute a(9): prime(9) = 23, f(23) = 11, f(11) = 5, f(5) = 2, f(2) = 1, where f(m) = Floor(m/2). Hence the sequence (of length 4) 23, 11, 5, 2 is the sequence of primes of maximal length formed by repeated application of f to prime(9) = 23. Therefore a(9) = 4.
MATHEMATICA
f[n_] := Module[{i}, i = 0; m = n; While[PrimeQ[m], m = Floor[m/2]; i++ ]; i]; Table[f[Prime[i]], {i, 1, 100}]
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Joseph L. Pe, Sep 22 2002
STATUS
approved