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.
%I A051885 #100 Jul 02 2025 16:01:58 %S A051885 0,1,2,3,4,5,6,7,8,9,19,29,39,49,59,69,79,89,99,199,299,399,499,599, %T A051885 699,799,899,999,1999,2999,3999,4999,5999,6999,7999,8999,9999,19999, %U A051885 29999,39999,49999,59999,69999,79999,89999,99999,199999,299999,399999,499999 %N A051885 Smallest number whose sum of digits is n. %C A051885 This is also the list of lunar triangular numbers: A087052 with duplicates removed. - _N. J. A. Sloane_, Jan 25 2011 %C A051885 Numbers n such that A061486(n) = n. - _Amarnath Murthy_, May 06 2001 %C A051885 The product of digits incremented by 1 is the same as the number incremented by 1. If a(n) = abcd...(a,b,c,d, etc. are digits of a(n)) {a(n) + 1} = (a+1)*(b+1)(c+1)*(d+1)*..., e.g., 299 + 1 = (2+1)*(9+1)*(9+1) = 300. - _Amarnath Murthy_, Jul 29 2003 %C A051885 A138471(a(n)) = 0. - _Reinhard Zumkeller_, Mar 19 2008 %C A051885 a(n+1) = A108971(A179988(n)). - _Reinhard Zumkeller_, Aug 09 2010, Jul 10 2011 %C A051885 Positions of records in A003132: A080151(n) = A003132(a(n)). - _Reinhard Zumkeller_, Jul 10 2011 %C A051885 a(n) = A242614(n,1). - _Reinhard Zumkeller_, Jul 16 2014 %C A051885 A254524(a(n)) = 1. - _Reinhard Zumkeller_, Oct 09 2015 %C A051885 The slowest strictly increasing sequence of nonnegative integers such that, for any two terms, calculating the difference of their decimal representations requires no borrowing. - _Rick L. Shepherd_, Aug 11 2017 %H A051885 Iain Fox, <a href="/A051885/b051885.txt">Table of n, a(n) for n = 0..9000</a> (first 101 terms from Reinhard Zumkeller) %H A051885 D. Applegate, M. LeBrun and N. J. A. Sloane, <a href="http://arxiv.org/abs/1107.1130">Dismal Arithmetic</a>, arXiv:1107.1130 [math.NT], 2011. [Note: we have now changed the name from "dismal arithmetic" to "lunar arithmetic" - the old name was too depressing] %H A051885 A. Murthy, <a href="http://www.gallup.unm.edu/~smarandache/SN/ScArt5/ExploringNewIdeas.pdf">Exploring some new ideas on Smarandache type sets, functions and sequences</a>, Smarandache Notions Journal Vol. 11 N. 1-2-3 Spring 2000. %H A051885 <a href="/index/Di#dismal">Index entries for sequences related to dismal (or lunar) arithmetic</a> %H A051885 <a href="/index/Rec#order_10">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,0,0,0,0,0,10,-10). %F A051885 These are the numbers i*10^j-1 (i=1..9, j >= 0). - _N. J. A. Sloane_, Jan 25 2011 %F A051885 a(n) = ((n mod 9) + 1)*10^floor(n/9) - 1 = a(n-1) + 10^floor((n-1)/9). - _Henry Bottomley_, Apr 24 2001 %F A051885 a(n) = A037124(n+1) - 1. - _Reinhard Zumkeller_, Jan 03 2008, Jul 10 2011 %F A051885 G.f.: x*(x^2+x+1)*(x^6+x^3+1) / ((x-1)*(10*x^9-1)). - _Colin Barker_, Feb 01 2013 %p A051885 b:=10; t1:=[]; for j from 0 to 15 do for i from 1 to b-1 do t1:=[op(t1), i*b^j-1]; od: od: t1; # _N. J. A. Sloane_, Jan 25 2011 %t A051885 a[n_] := (Mod[n, 9] + 1)*10^Floor[n/9] - 1; Table[a[n], {n, 0, 49}](* _Jean-François Alcover_, Dec 01 2011, after _Henry Bottomley_ *) %o A051885 (Haskell) %o A051885 a051885 n = (m + 1) * 10^n' - 1 where (n',m) = divMod n 9 %o A051885 -- _Reinhard Zumkeller_, Jul 10 2011 %o A051885 (Magma) [i*10^j-1: i in [1..9], j in [0..5]]; %o A051885 (PARI) A051885(n) = (n%9+1)*10^(n\9)-1 \\ _M. F. Hasler_, Jun 17 2012 %o A051885 (PARI) first(n) = Vec(x*(x^2 + x + 1)*(x^6 + x^3 + 1)/((x - 1)*(10*x^9 - 1)) + O(x^n), -n) \\ _Iain Fox_, Dec 30 2017 %o A051885 (Python) %o A051885 def A051885(n): return ((n % 9)+1)*10**(n//9)-1 # _Chai Wah Wu_, Apr 04 2021 %Y A051885 Cf. A061104, A061105, A061486, A007953, A067043, A087052. %Y A051885 Numbers of form i*b^j-1 (i=1..b-1, j >= 0) for bases b = 2 through 9: A000225, A062318, A180516, A181287, A181288, A181303, A165804, A140576. - _N. J. A. Sloane_, Jan 25 2011 %Y A051885 Cf. A002283. %Y A051885 Cf. A254524. %K A051885 nonn,easy,base,nice %O A051885 0,3 %A A051885 _Felice Russo_, Dec 15 1999 %E A051885 More terms from _James Sellers_, Dec 16 1999 %E A051885 Offset fixed by _Reinhard Zumkeller_, Jul 10 2011