login
a(n) = number of ordered pairs (i,j) such that a(i)+a(j)<n, i<j<n; a(1)=a(2)=1.
1

%I #18 Jun 10 2017 16:44:51

%S 1,1,1,3,6,6,6,15,15,18,18,18,21,21,21,21,27,27,29,38,38,47,59,59,72,

%T 72,72,84,90,90,96,96,97,109,109,112,123,123,123,141,141,143,153,153,

%U 161,167,167,170,181,181,186,186,186,193,194,194,202,202,202,210,216,216

%N a(n) = number of ordered pairs (i,j) such that a(i)+a(j)<n, i<j<n; a(1)=a(2)=1.

%C 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

%H Vincenzo Librandi, <a href="/A160504/b160504.txt">Table of n, a(n) for n = 1..402</a>

%e 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.

%e 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.

%e 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.

%t 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]

%t a160504[n_] := Nest[Append[#, count[#]]&, {1, 1}, n]

%t a160504[60] (* data *)

%t (* _Hartmut F. W. Hoft_, Jun 04 2017 *)

%K nonn

%O 1,4

%A _Masahiko Shin_, May 16 2009

%E There were non-ASCII characters in the definition, which I hope I have interpreted correctly! - _N. J. A. Sloane_, Jul 23 2009

%E Definition corrected by _Sean A. Irvine_, Apr 08 2010

%E Corrected and extended by _Sean A. Irvine_, Apr 08 2010