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 #2 Feb 11 2014 19:05:30
%S 1,1,2,2,3,1,1,1,4,1,1,1,1,1,5,1,2,1,1,1,1,1,2,1,1,1,1,2,1,1,1,1,1,1,
%T 1,1,1,1,3,1,2,1,1,1,1,1,1,1,2,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,
%U 2,1,1,3,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,1,1,1,2,1,1,1,1
%N a(n) = the maximal length of a sequence of primes {s_1 = prime(n), s_2 = f(s1), s_3 = f(s_2), ....} formed by repeated application of f(m) = Floor(m/2) on prime(n).
%C The smallest value of n such that a(n) = 6 is n = 417.
%e 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.
%t f[n_] := Module[{i}, i = 0; m = n; While[PrimeQ[m], m = Floor[m/2]; i++ ]; i]; Table[f[Prime[i]], {i, 1, 100}]
%K easy,nonn
%O 1,3
%A _Joseph L. Pe_, Sep 22 2002