%I #2 Mar 30 2012 18:37:45
%S 2,3,5,8,11,19,34,46,53,95,103,179,251,299,503,743,1006,1319,1439,
%T 2878,3359,3959,6619,5387,10774,5879,11758,17747,24373,40679,26879,
%U 35279,61739,23399,46798
%N a(n) is the least integer such that the iterated modulus chain m_1=mod(a(n),m),m_2=mod(a(n),m_1),m_3=mod(a(n),m_2),..., m_n= (0 or 1) reaches a length n. The companion value m, associated to a(n), is given in A177968.
%C Apart from 8, seems to consist of primes or a product of two primes.
%e 3 mod 2 =1
%e 5 mod 3 =2 ;5 mod 2 =1
%e 8 mod 5 =3 ;8 mod 3 =2; 8 mod 2 =0
%e 11 mod 7 =4; 11 mod 4 =3; 11 mod 3 =2; 11 mod 2= 1
%e or, as a triangular table:
%e 1
%e 2;1
%e 3;2;1
%e 5;3;2;1
%e 8;5;3;2;0
%e 11;7;4;3;2;1
%e 19;12;7;5;4;3;1
%e 34;25;9;7;6;4;2;0
%t modlen[n_,m_]:= Length[NestWhileList[Mod[n,#1]&,m,#1>1&]];
%t Table[Max[modlen[n, #1]& /@ Range[Floor[n/2]]],{n,70000}]; Flatten[Position[%,#,1,1]&/@ Range[64]]; Function[n,modlen[n, #1]& /@ Range[Floor[n/2]]]/@ %; Flatten[First /@ (Position[ #,Max[ # ]]&/@ %)]; Drop[Transpose[{%%%,%}],2]
%Y Cf. A177968
%K nonn
%O 1,1
%A _Wouter Meeussen_, May 16 2010