

A068127


Triangular numbers with sum of digits = 3.


7



3, 21, 120, 210, 300, 10011, 20100, 2001000, 200010000, 20000100000, 2000001000000, 200000010000000, 20000000100000000, 2000000001000000000, 200000000010000000000, 20000000000100000000000, 2000000000001000000000000, 200000000000010000000000000, 20000000000000100000000000000
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

The sequence is unbounded, as the (2*10^k)th triangular number is a term.


LINKS



MATHEMATICA

t = {}; Do[tri = n*(n+1)/2; If[Total[IntegerDigits[tri, 10]] == 3, AppendTo[t, tri]], {n, 1000000}]; t (* T. D. Noe, Jun 05 2012 *)
Select[Accumulate[Range[2*10^6]], Total[IntegerDigits[#]]==3&] (* Harvey P. Dale, Jun 22 2021 *)
Sort @ Select[Plus @@@ (10^Select[Tuples[Range[0, 29], 3], Min[Differences[#]] >= 0 &]), IntegerQ[Sqrt[8*# + 1]] &] (* Amiram Eldar, May 19 2022 *)


PROG

(Python)
from math import isqrt
from itertools import count, islice
def istri(n): return (lambda x: x == isqrt(x)**2)(8*n+1)
def agen(): yield from filter(istri, (10**i + 10**j + 10**k for i in count(0) for j in range(i+1) for k in range(j+1)))


CROSSREFS



KEYWORD

base,easy,nonn


AUTHOR



EXTENSIONS



STATUS

approved



