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.

Showing 1-2 of 2 results.

A249515 Numbers k for which the digital sum of k contains the same distinct digits as k itself.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 199, 919, 991, 1188, 1818, 1881, 2999, 8118, 8181, 8811, 9299, 9929, 9992, 11177, 11444, 11717, 11771, 13333, 14144, 14414, 14441, 17117, 17171, 17711, 22888, 26666, 28288, 28828, 28882, 31333, 33133, 33313, 33331, 39999, 41144
Offset: 1

Views

Author

Jaroslav Krizek, Oct 31 2014

Keywords

Examples

			199 is in the sequence since 1 + 9 + 9 = 19.
		

Crossrefs

Programs

  • Magma
    [k: k in [0..1000000] | Set(Intseq(k)) eq Set(Intseq(&+Intseq(k)))];
    
  • Mathematica
    Select[Range[1000], Union[IntegerDigits[#]] == Union[Plus@@IntegerDigits[#]] &] (* Alonso del Arte, Nov 02 2014 *)
  • PARI
    for(n=0, 5*10^4, if(vecsort(digits(n),,8) ==vecsort(digits(sumdigits(n)),,8), print1(n,", "))) \\ Derek Orr, Nov 02 2014
    
  • Python
    from itertools import product
    A249515_list = [0]
    for g in range(1,12):
        xp, ylist = [], []
        for i in range(9*g,-1,-1):
            x = set(str(i))
            if not x in xp:
                xv = [int(d) for d in x]
                imin = int(''.join(sorted(str(i))))
                if max(xv)*(g-len(x)) >= imin-sum(xv) and i-sum(xv) >=  min(xv)*(g-len(x)):
                    xp.append(x)
                    for y in product(x,repeat=g):
                        if y[0] != '0' and set(y) == x and set(str(sum([int(d) for d in y]))) == x:
                            ylist.append(int(''.join(y)))
        A249515_list.extend(sorted(ylist)) # Chai Wah Wu, Nov 15 2014

A249516 Numbers k for which the digital product A007954(k) contains the same distinct digits as the number k.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 111, 1111, 1288, 1557, 1575, 1755, 1828, 1882, 2188, 2818, 2881, 3448, 3484, 3577, 3757, 3775, 3844, 4348, 4384, 4438, 4483, 4834, 4843, 5157, 5175, 5377, 5517, 5571, 5715, 5737, 5751, 5773, 7155, 7357, 7375, 7515, 7537, 7551
Offset: 1

Views

Author

Jaroslav Krizek, Oct 31 2014

Keywords

Examples

			1288 is a member since 1288 and its digital product 1*2*8*8 = 128 have the same digit set {1,2,8}.
		

Crossrefs

Programs

  • Magma
    [0] cat [n: n in [0..100000] | Set(Intseq(n)) eq Set(Intseq(&*Intseq(n)))];
    
  • Mathematica
    Select[Range[0,8000],Union[IntegerDigits[Times@@IntegerDigits[#]]] == Union[ IntegerDigits[#]]&] (* Harvey P. Dale, Aug 05 2018 *)
  • PARI
    print1(0,", ");for(n=1,10^4,d=digits(n);p=prod(i=1,#d,d[i]);if(vecsort(digits(p),,8)==vecsort(d,,8),print1(n,", "))) \\ Derek Orr, Nov 05 2014
Showing 1-2 of 2 results.