This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A247021 #19 May 21 2025 10:43:04 %S A247021 1,15,21,45,55,171,741,1225,1275,1711,2145,2211,2415,2775,5151,11175, %T A247021 15225,21115,22155,25425,44551,45451,72771,77421,112575,121771,124251, %U A247021 125751,151525,211575,221445,222111,224115,227475,254541,255255,417241,451725,551775,577275 %N A247021 Triangular numbers composed of only digits with line segments or both line segments and curves {1, 2, 4, 5, 7}. %C A247021 Intersection of A000217 and A082741. %C A247021 Every term is congruent to 1 mod 10 or 5 mod 10. - _Derek Orr_, Sep 19 2014 %H A247021 K. D. Bajpai, <a href="/A247021/b247021.txt">Table of n, a(n) for n = 1..6912</a> %e A247021 1275 is a term because 1275 = 50 * (50 + 1) / 2, is a triangular number composed of digits 1, 2, 7 and 5. %e A247021 2145 is a term because 2145 = 65 * (65 + 1) / 2, is a triangular number composed of digits 1, 2, 4 and 5. %e A247021 a(38) = 451725 is the first occurrence of triangular number using each digit 1, 2, 4, 5 or 7 at least once. %t A247021 A247021 = {}; Do[t = n*(n + 1)/2; If[Intersection[IntegerDigits[t], {0, 3, 6, 8, 9}] == {}, AppendTo[A247021, t]], {n, 1000}]; A247021 %t A247021 Select[Accumulate[Range[1500]],SubsetQ[{1,2,4,5,7}, IntegerDigits[#]]&] (* _Harvey P. Dale_, May 20 2025 *) %o A247021 (Python) %o A247021 for n in range(10**3): %o A247021 s = str(int(n*(n+1)/2)) %o A247021 if not (s.count('0') + s.count('3') + s.count('6') + s.count('8') + s.count('9')): %o A247021 print(int(s), end=', ') # _Derek Orr_, Sep 19 2014 %Y A247021 Cf. A000217, A028373, A028374, A082741, A119033. %K A247021 nonn,base,less %O A247021 1,2 %A A247021 _K. D. Bajpai_, Sep 09 2014