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-1 of 1 results.

A248717 Zeroless numbers k such that k - (sum of digits of k) and k - (product of digits of k) contain the same distinct digits as k.

Original entry on oeis.org

12331, 13231, 13651, 21331, 23131, 23552, 25545, 26553, 31231, 31651, 32131, 32552, 34355, 34531, 34554, 35354, 35453, 35631, 36156, 36231, 43531, 45353, 46431, 53631, 54353, 54885, 55245, 55296, 59652, 61599, 63231, 64431, 87973, 95274, 122553, 125918, 126531, 126535, 126553
Offset: 1

Views

Author

Derek Orr, Oct 12 2014

Keywords

Comments

Intersection of A248209 and A248210. If a number k contains a zero, it automatically holds the property that k - (product of digits of k) contains the same distinct digits as k. - Tanya Khovanova, Jul 18 2021
"The same distinct digits" in the title means the same set of digits ignoring multiplicities. - Tanya Khovanova, Jul 18 2021

Crossrefs

Programs

  • Mathematica
    Select[Range@100000,(d=IntegerDigits@#;FreeQ[d,0]&&Union@IntegerDigits[#-Times@@d]==Union@d==Union@IntegerDigits[#-Total@d])&] (* Giorgos Kalogeropoulos, Jul 20 2021 *)
  • PARI
    for(n=0, 10^6, d=digits(n); p=prod(i=1, #d, d[i]); vp=vecsort(digits(p-n), , 8); vs=vecsort(digits(sumdigits(n)-n), , 8); if(vs==vp&&vp==vecsort(d, , 8)&&vs==vecsort(d, , 8)&&p, print1(n, ", ")))
    
  • Python
    from math import prod
    def ok(n):
        s = str(n); d = list(map(int, s))
        if '0' in s: return False
        return set(s) == set(str(n-sum(d))) and set(s) == set(str(n-prod(d)))
    print(list(filter(ok, range(127000)))) # Michael S. Branicky, Jul 18 2021
Showing 1-1 of 1 results.