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 A249515 #30 Jun 06 2025 14:48:31 %S A249515 0,1,2,3,4,5,6,7,8,9,199,919,991,1188,1818,1881,2999,8118,8181,8811, %T A249515 9299,9929,9992,11177,11444,11717,11771,13333,14144,14414,14441,17117, %U A249515 17171,17711,22888,26666,28288,28828,28882,31333,33133,33313,33331,39999,41144 %N A249515 Numbers k for which the digital sum of k contains the same distinct digits as k itself. %H A249515 Chai Wah Wu, <a href="/A249515/b249515.txt">Table of n, a(n) for n = 1..4477</a> %e A249515 199 is in the sequence since 1 + 9 + 9 = 19. %t A249515 Select[Range[1000], Union[IntegerDigits[#]] == Union[Plus@@IntegerDigits[#]] &] (* _Alonso del Arte_, Nov 02 2014 *) %o A249515 (Magma) [k: k in [0..1000000] | Set(Intseq(k)) eq Set(Intseq(&+Intseq(k)))]; %o A249515 (PARI) for(n=0, 5*10^4, if(vecsort(digits(n),,8) ==vecsort(digits(sumdigits(n)),,8), print1(n,", "))) \\ _Derek Orr_, Nov 02 2014 %o A249515 (Python) %o A249515 from itertools import product %o A249515 A249515_list = [0] %o A249515 for g in range(1,12): %o A249515 xp, ylist = [], [] %o A249515 for i in range(9*g,-1,-1): %o A249515 x = set(str(i)) %o A249515 if not x in xp: %o A249515 xv = [int(d) for d in x] %o A249515 imin = int(''.join(sorted(str(i)))) %o A249515 if max(xv)*(g-len(x)) >= imin-sum(xv) and i-sum(xv) >= min(xv)*(g-len(x)): %o A249515 xp.append(x) %o A249515 for y in product(x,repeat=g): %o A249515 if y[0] != '0' and set(y) == x and set(str(sum([int(d) for d in y]))) == x: %o A249515 ylist.append(int(''.join(y))) %o A249515 A249515_list.extend(sorted(ylist)) # _Chai Wah Wu_, Nov 15 2014 %Y A249515 Cf. A007953, A249516, A249517. %K A249515 nonn,base,easy %O A249515 1,3 %A A249515 _Jaroslav Krizek_, Oct 31 2014