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.

A205960 Smallest odd number with digit sum equal to n.

This page as a plain text file.
%I A205960 #15 Sep 15 2020 17:49:08
%S A205960 1,11,3,13,5,15,7,17,9,19,29,39,49,59,69,79,89,99,199,299,399,499,599,
%T A205960 699,799,899,999,1999,2999,3999,4999,5999,6999,7999,8999,9999,19999,
%U A205960 29999,39999,49999,59999,69999,79999,89999,99999,199999,299999,399999,499999
%N A205960 Smallest odd number with digit sum equal to n.
%C A205960 Except for a(2), a(4), a(6) and a(8), the same as A051885 (n>0).
%H A205960 Arkadiusz Wesolowski, <a href="/A205960/b205960.txt">Table of n, a(n) for n = 1..1000</a>
%H A205960 <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 A205960 a(n+1) = A069532(n) + 1.
%F A205960 From _Chai Wah Wu_, Sep 15 2020: (Start)
%F A205960 a(n) = a(n-1) + 10*a(n-9) - 10*a(n-10) for n > 18.
%F A205960 G.f.: x*(90*x^17 - 90*x^16 + 90*x^15 - 90*x^14 + 90*x^13 - 90*x^12 + 90*x^11 - 90*x^10 - 8*x^8 + 10*x^7 - 8*x^6 + 10*x^5 - 8*x^4 + 10*x^3 - 8*x^2 + 10*x + 1)/((x - 1)*(10*x^9 - 1)). (End)
%t A205960 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 A205960 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 *)
%Y A205960 Cf. A051885, A069532.
%K A205960 base,easy,nonn
%O A205960 1,2
%A A205960 _Arkadiusz Wesolowski_, Feb 02 2012