login
Triangular numbers with strictly increasing sum of digits.
4

%I #35 Dec 06 2021 00:51:28

%S 1,3,6,28,66,78,378,496,1596,5778,5995,8778,47895,58996,196878,468996,

%T 887778,1788886,4896885,5897895,13999986,15997996,38997696,88877778,

%U 179977878,189978778,398988876,686999778,1699998895,5779898886,9876799878,38689969878,39689699896,67898888778,89996788896,299789989975

%N Triangular numbers with strictly increasing sum of digits.

%H K. D. Bajpai, <a href="/A068808/b068808.txt">Table of n, a(n) for n = 1..55</a>

%e a(4) = 28 = 7 * (7 + 1) / 2, which is 7th triangular number with sum of digits = 2 + 8 = 10. a(5) = 66 = 11 * (11 + 1) / 2, which is 11th triangular number with sum of digits = 6 + 6 = 12. Since 12 > 10, 28 and 66 are in list. - _K. D. Bajpai_, Sep 04 2014

%p dig := X->convert((convert(X,base,10)),`+`); T := k->k*(k+1)/2; S := k->seq(dig(T(i)),i=1..k-1); seq(`if`(n>1 and dig(T(n))>max(S(n)), T(n),printf("")),n=1..2000);

%t t = {}; s = 0; Do[If[(x = Total[IntegerDigits[y = n*(n + 1)/2]]) > s, AppendTo[t, y]; s = x], {n, 120000}]; t (* _Jayanta Basu_, Aug 06 2013 *)

%o (PARI)

%o tri(n)=n*(n+1)/2;

%o A068808=List; listput(A068808,1,1);

%o y=2;for(k=1,100000,if(sumdigits(Vec(A068808)[y-1])<sumdigits(tri(k)),listput(A068808,tri(k),y);y++)); A068808 \\ _Edward Jiang_, Sep 04 2014

%Y Cf. A000217, A062688.

%K base,easy,nonn

%O 1,2

%A _Amarnath Murthy_, Mar 06 2002

%E More terms from Francois Jooste (phukraut(AT)hotmail.com), Mar 10 2002

%E More terms from _Sascha Kurz_, Mar 27 2002

%E a(31) to a(33) from _K. D. Bajpai_, Sep 04 2014

%E a(34) to a(36) from _Robert Israel_, Sep 04 2014