login
a(n) is the index of the smallest triangular number containing exactly n 7's.
1

%I #17 Feb 16 2025 08:32:39

%S 12,59,381,3684,8692,70381,122292,3762381,7453707,18856074,124721736,

%T 587838545,3996943276,18845571218,27483805332,394393554074,

%U 1246890354231,11642661866667

%N a(n) is the index of the smallest triangular number containing exactly n 7's.

%H Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/TriangularNumber.html">Triangular Number</a>

%t nsmall = Table[Infinity, 20];

%t For[i = 0, i <= 10^6, i++, p = PolygonalNumber[i];

%t n0 = Count[IntegerDigits[p], 7];

%t If[nsmall[[n0]] > i, nsmall[[n0]] = i]];

%t ReplaceAll[nsmall, Infinity -> "?"] (* _Robert Price_, Mar 22 2020 *)

%Y Cf. A036524, A048355-A049364.

%K nonn,base,more,changed

%O 1,1

%A _Patrick De Geest_, Mar 15 1999

%E a(13)-a(15) from _Lars Blomberg_, May 16 2011

%E a(16)-a(18) from _Giovanni Resta_, Oct 30 2019