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.

A061219 a(n) is the largest number which can be formed with no zeros, using least number of digits and having digit sum = n.

This page as a plain text file.
%I A061219 #12 Aug 16 2023 08:20:09
%S A061219 1,2,3,4,5,6,7,8,9,91,92,93,94,95,96,97,98,99,991,992,993,994,995,996,
%T A061219 997,998,999,9991,9992,9993,9994,9995,9996,9997,9998,9999,99991,99992,
%U A061219 99993,99994,99995,99996,99997,99998,99999,999991,999992,999993,999994
%N A061219 a(n) is the largest number which can be formed with no zeros, using least number of digits and having digit sum = n.
%C A061219 a(n) is the digit reversal of terms of A051885 giving such smallest numbers.
%H A061219 Michael S. Branicky, <a href="/A061219/b061219.txt">Table of n, a(n) for n = 1..9000</a>
%e A061219 a(22) = 994, digit sum = 22.
%e A061219 a(100) = 999999999991.
%t A061219 dsn[n_]:=Module[{d=Quotient[n,9]},FromDigits[PadLeft[{n-9d},d,9]]]; If[Divisible[#,10],#/10,#]&/@Array[dsn,50,10] (* _Harvey P. Dale_, Dec 08 2013 *)
%o A061219 (Python)
%o A061219 def a(n): return int("9"*(n//9)+str(n%9)*(n%9>0))
%o A061219 print([a(n) for n in range(1, 50)]) # _Michael S. Branicky_, Aug 16 2023
%Y A061219 Cf. A051885.
%K A061219 nonn,base
%O A061219 1,2
%A A061219 _Amarnath Murthy_, Apr 22 2001
%E A061219 More terms from _Harvey P. Dale_, Dec 08 2013
%E A061219 Offset corrected by _Michael S. Branicky_, Aug 16 2023