login
A160504
a(n) = number of ordered pairs (i,j) such that a(i)+a(j)<n, i<j<n; a(1)=a(2)=1.
1
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, 72, 72, 84, 90, 90, 96, 96, 97, 109, 109, 112, 123, 123, 123, 141, 141, 143, 153, 153, 161, 167, 167, 170, 181, 181, 186, 186, 186, 193, 194, 194, 202, 202, 202, 210, 216, 216
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
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
Sequence in context: A295559 A161645 A081289 * A291801 A227501 A294981
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