OFFSET
1,1
FORMULA
a(n) ~ n. More specifically, a(n) - n = O(n^k * log n) with k = log 9/log 10. (This bound is not tight.) - Charles R Greathouse IV, Oct 12 2014
PROG
(PARI)
for(n=1, 10^4, d=digits(n); if(vecsort(digits(n), , 8)==vecsort(digits(n-sumdigits(n)), , 8), print1(n, ", ")))
(PARI) is(n)=Set(digits(n))==Set(digits(n-sumdigits(n))) \\ Charles R Greathouse IV, Oct 12 2014
(Magma) [n: n in [1..3000] | Set(Intseq(n-&+Intseq(n))) eq Set(Intseq(n))]; // Bruno Berselli, Oct 12 2014
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Derek Orr, Oct 03 2014
STATUS
approved