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.

A069672 Largest n-digit triangular number with minimum digit sum.

This page as a plain text file.
%I A069672 #8 May 25 2016 22:01:11
%S A069672 1,10,300,3003,20100,112101,2001000,33020001,200010000,3200120001,
%T A069672 20000100000,320001200001,2000001000000,32000012000001,
%U A069672 200000010000000,3200000120000001,20000000100000000,320000001200000001,2000000001000000000,32000000012000000001,200000000010000000000,3200000000120000000001,20000000000100000000000,320000000001200000000001,2000000000001000000000000,32000000000012000000000001,200000000000010000000000000,3200000000000120000000000001,20000000000000100000000000000,320000000000001200000000000001
%N A069672 Largest n-digit triangular number with minimum digit sum.
%C A069672 Does the obvious pattern continue? - _Vladeta Jovovic_, Apr 07 2002
%p A069672 F:= proc(d)
%p A069672 local s, P, nP, S, x, bestx;
%p A069672 bestx:= 0;
%p A069672 for s in [1,3,6,9] do
%p A069672   for P in map(op @combinat:-permute, combinat:-partition(s)) do
%p A069672     nP:= nops(P);
%p A069672     for S in map(t -> [d-1, op(t)], combinat:-choose([$0..d-2],nP-1)) do
%p A069672       x:= add(P[i]*10^S[i],i=1..nP);
%p A069672       if x > bestx and issqr(1+8*x) then bestx:= x fi;
%p A069672     od;
%p A069672   od;
%p A069672   if bestx > 0 then return bestx fi;
%p A069672 od;
%p A069672 end proc:
%p A069672 seq(F(d),d=1..30); # _Robert Israel_, May 25 2016
%Y A069672 Cf. A069661, A069662, A069663, A069664, A069665, A069666, A069667, A069668, A069669, A069670, A069671.
%K A069672 nonn,base
%O A069672 1,2
%A A069672 _Amarnath Murthy_, Apr 06 2002
%E A069672 More terms from _Vladeta Jovovic_, Apr 07 2002
%E A069672 a(15)..a(30) from _Robert Israel_, May 25 2016