login
A036521
Smallest triangular number containing exactly n 4's.
2
45, 4465, 144453, 544446, 427444941, 414446445, 4440447441, 444344944456, 4404424444435, 1046444944404441, 14546344444444945, 441441444448564440, 4445444444946443841, 444438244043444444046, 4444844454444484014645, 44641424644444444411441, 4024414288444444444404441, 44448461444441444448442420
OFFSET
1,1
MATHEMATICA
nsmall = Table[Infinity, 20];
For[i = 0, i <= 10^6, i++, p = PolygonalNumber[i];
n0 = Count[IntegerDigits[p], 4];
If[nsmall[[n0]] > p, nsmall[[n0]] = p]];
ReplaceAll[nsmall, Infinity -> "?"] (* Robert Price, Mar 22 2020 *)
CROSSREFS
KEYWORD
nonn,base
EXTENSIONS
a(12)-a(18) from Giovanni Resta, Oct 30 2019
STATUS
approved