OFFSET
0,2
COMMENTS
Numbers which can't be represented as the sum of two numbers with the same sum of digits in base 10 (according to Daniel Starodubtsev). More generally, this definition and the definition from the name of this sequence matches for any even base. - Mikhail Kurkov, May 19 2019 [verification needed]
FORMULA
a(n) = h(n,10)*10^g(n,10)-1, with f(n,k) = floor((n+1)/(k-1)) - floor(n/(k-1)), g(n,k) = floor(2*(n+1)/(k-1)) - f(n,k), h(n,k) = 2*(n+1) - (k-1)*g(n,k). - Mikhail Kurkov, May 19 2019
EXAMPLE
For n=0, the least number with sum of digits 2*0+1=1 is 1, so a(0)=1.
PROG
(PARI) a(n) = {my(k=0); while (sumdigits(k) != 2*n+1, k++); k; } \\ Michel Marcus, May 19 2019
(PARI) a(n) = if(n<5, return(2*n+1)); n-=5; [30, 50, 70, 90, 200, 400, 600, 800, 1000][n%9+1] * 100^(n\9)-1 \\ David A. Corneth, May 19 2019
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Paul Curtz, Oct 03 2007
STATUS
approved