A247021 Triangular numbers composed of only digits with line segments or both line segments and curves {1, 2, 4, 5, 7}.
1, 15, 21, 45, 55, 171, 741, 1225, 1275, 1711, 2145, 2211, 2415, 2775, 5151, 11175, 15225, 21115, 22155, 25425, 44551, 45451, 72771, 77421, 112575, 121771, 124251, 125751, 151525, 211575, 221445, 222111, 224115, 227475, 254541, 255255, 417241, 451725, 551775, 577275
Offset: 1
Examples
1275 is a term because 1275 = 50 * (50 + 1) / 2, is a triangular number composed of digits 1, 2, 7 and 5. 2145 is a term because 2145 = 65 * (65 + 1) / 2, is a triangular number composed of digits 1, 2, 4 and 5. a(38) = 451725 is the first occurrence of triangular number using each digit 1, 2, 4, 5 or 7 at least once.
Links
- K. D. Bajpai, Table of n, a(n) for n = 1..6912
Programs
-
Mathematica
A247021 = {}; Do[t = n*(n + 1)/2; If[Intersection[IntegerDigits[t], {0, 3, 6, 8, 9}] == {}, AppendTo[A247021, t]], {n, 1000}]; A247021 Select[Accumulate[Range[1500]],SubsetQ[{1,2,4,5,7}, IntegerDigits[#]]&] (* Harvey P. Dale, May 20 2025 *)
-
Python
for n in range(10**3): s = str(int(n*(n+1)/2)) if not (s.count('0') + s.count('3') + s.count('6') + s.count('8') + s.count('9')): print(int(s), end=', ') # Derek Orr, Sep 19 2014
Comments