%I #23 Sep 25 2017 03:32:14
%S 1,2,3,7,11,15,34,53,72,91,201,311,421,531,641,751,861,1832,2803,3774,
%T 4745,5716,6687,7658,8629,9600,10571,11542,12513,13484,14455,15426,
%U 16397,17368,18339,19310,20281,21252,22223,23194,24165,25136,26107,27078,28049
%N a(1)=1. a(n) = a(n-1) + sum of the triangular numbers which are among the first (n-1) terms of the sequence.
%H Colin Barker, <a href="/A100963/b100963.txt">Table of n, a(n) for n = 1..1000</a>
%t Nest[Append[#, Last@ # + Total@ Select[#, IntegerQ@ First@ Values@ Last@ Solve[x (x + 1)/2 == #, x] &]] &, {1}, 44] (* _Michael De Vlieger_, Sep 24 2017 *)
%o (PARI) vector(100, n, if(n==1, a_n_1=sum_=1, a_n_1+=sum_; if(ispolygonal(a_n_1, 3), sum_+=a_n_1)); a_n_1) \\ _Colin Barker_, Feb 19 2015
%Y Cf. A129895.
%Y Cf. A101135, A255260, A255261.
%K nonn
%O 1,2
%A _Leroy Quet_, Jun 07 2007
%E More terms from _Robert Gerbicz_, Jun 10 2007
|