login

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

Smallest triangular number containing exactly n 7's.
1

%I #12 Mar 22 2020 17:30:53

%S 78,1770,72771,6787770,37779778,2476777771,7477727778,7077757275771,

%T 27778877747778,177775772774775,7777755777787716,172777077787777785,

%U 7987777777779277726,177577777275777787371,377679777777377717778,77773137747757777775775,777367777737777774977796,67775787670776777773777778

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

%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]] > p, nsmall[[n0]] = p]];

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

%Y Cf. A048362, A036517-A036526.

%K nonn,base

%O 1,1

%A _David W. Wilson_

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