login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Smallest triangular number containing exactly n 2's.
1

%I #14 Mar 22 2020 23:41:44

%S 21,1225,23220,212226,22121226,2202322528,21222223210,202222242820,

%T 22122952222920,229222922294226,2221228522222920,222322222025202925,

%U 222212284222222920,22222122841222222920,2092226022222222442221,22222222042522220020225,622222207421222222222253,22222212062122272422225226

%N Smallest triangular number containing exactly n 2's.

%t nsmall = Table[Infinity, 20];

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

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

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

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

%Y Cf. A048357, A036517-A036526.

%K nonn,base

%O 1,1

%A _David W. Wilson_

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