This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A205960 Smallest odd number with digit sum equal to n. 1

%I

%S 1,11,3,13,5,15,7,17,9,19,29,39,49,59,69,79,89,99,199,299,399,499,599,

%T 699,799,899,999,1999,2999,3999,4999,5999,6999,7999,8999,9999,19999,

%U 29999,39999,49999,59999,69999,79999,89999,99999,199999,299999,399999,499999

%N Smallest odd number with digit sum equal to n.

%C Except for a(2), a(4), a(6) and a(8), the same as A051885 (n>0).

%H Arkadiusz Wesolowski, <a href="/A205960/b205960.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n+1) = A069532(n) + 1.

%t e = 5; Join[Table[l = 1; While[True, a = 2*l - 1; If[Total[IntegerDigits[a]] == n, Break[]]; l++]; a, {n, 8}], Flatten[Table[i*10^j - 1, {j, e}, {i, 9}]]]

%t With[{ds=Table[{n,Total[IntegerDigits[n]]},{n,1,600001,2}]},Table[ SelectFirst[ ds,#[[2]]==k&],{k,50}]][[All,1]] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Apr 30 2018 *)

%K base,easy,nonn

%O 1,2

%A _Arkadiusz Wesolowski_, Feb 02 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 25 03:10 EDT 2019. Contains 326318 sequences. (Running on oeis4.)