OFFSET
1,4
COMMENTS
It appears that the longest run of identical values in the sequence has length five, occurring twice: a(69) = ... = a(73) = 239 and a(81) = ... = a(85) = 282. Length four appears once at a(13) = ... = a(16) = 21. The last adjacent pair with equal values appears to be a(340) = a(341) = 2558; checked through n=1000. - Hartmut F. W. Hoft, Jun 04 2017
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..402
EXAMPLE
a(3) = 1 because there is only one possible pair of previous terms, {1, 1}, and its sum is 2, which is less than 3.
a(4) = 3 because there are three possible pairs of previous terms {a(1), a(2)}, {a(1), a(3)}, {a(2), a(3)}, which are here considered distinct even though they all work out to {1, 1} with a sum of 2, which is less than 4.
a(5) = 6 because there are six possible pairs of previous terms: {a(1), a(2)}, {a(1), a(3)}, {a(1), 3}, {a(2), a(3)}, {a(2), 3}, {a(3), 3}, with sums 2, 2, 4, 2, 4, 4, respectively, all of which are less than 6.
MATHEMATICA
count[cL_] := Module[{n=Length[cL]+1, c=0, i, j}, Do[If[cL[[i]]+cL[[j]]<n, c++], {j, 2, n-1}, {i, j-1}]; c]
a160504[n_] := Nest[Append[#, count[#]]&, {1, 1}, n]
a160504[60] (* data *)
(* Hartmut F. W. Hoft, Jun 04 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Masahiko Shin, May 16 2009
EXTENSIONS
There were non-ASCII characters in the definition, which I hope I have interpreted correctly! - N. J. A. Sloane, Jul 23 2009
Definition corrected by Sean A. Irvine, Apr 08 2010
Corrected and extended by Sean A. Irvine, Apr 08 2010
STATUS
approved