cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A036518 Smallest triangular number containing exactly n 1's.

This page as a plain text file.
%I A036518 #23 Sep 09 2024 10:11:12
%S A036518 1,171,1711,105111,1188111,18111171,1111160511,11161151121,
%T A036518 111111101310,11311511141161,121111912011111,11111811011411671,
%U A036518 11101111131911151,11111111111113201,111111312111373411111,1119711111215111121171,111112117111126711111195,1141011111112731111616111
%N A036518 Smallest triangular number containing exactly n 1's.
%F A036518 a(n) = A000217(A048356(n)). - _Michel Marcus_, Aug 12 2014
%t A036518 nsmall = Table[Infinity, 20];
%t A036518 For[i = 0, i <= 10^6, i++, p = PolygonalNumber[i];
%t A036518   n0 = Count[IntegerDigits[p], 1];
%t A036518   If[nsmall[[n0]] > p, nsmall[[n0]] = p]];
%t A036518 ReplaceAll[nsmall, Infinity -> "?"] (* _Robert Price_, Mar 22 2020 *)
%t A036518 Module[{nn=5*10^6,tr},tr={#,DigitCount[#,10,1]}&/@Accumulate[Range[ nn]]; Table[ SelectFirst[tr,#[[2]]==k&],{k,10}]][[;;,1]] (* The program generates the first 10 terms of the sequence. *) (* _Harvey P. Dale_, Sep 01 2024 *)
%Y A036518 Cf. A048356, A036517-A036526.
%K A036518 nonn,base
%O A036518 1,2
%A A036518 _David W. Wilson_
%E A036518 Definition clarified by _Robert Israel_, Aug 10 2014
%E A036518 a(15)-a(16) from A048356 by _Michel Marcus_, Aug 12 2014
%E A036518 a(17)-a(18) from _Giovanni Resta_, Oct 30 2019