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.

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.

This page as a plain text file.
%I A248717 #25 Aug 13 2021 22:20:29
%S A248717 12331,13231,13651,21331,23131,23552,25545,26553,31231,31651,32131,
%T A248717 32552,34355,34531,34554,35354,35453,35631,36156,36231,43531,45353,
%U A248717 46431,53631,54353,54885,55245,55296,59652,61599,63231,64431,87973,95274,122553,125918,126531,126535,126553
%N 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.
%C A248717 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
%C A248717 "The same distinct digits" in the title means the same set of digits ignoring multiplicities. - _Tanya Khovanova_, Jul 18 2021
%t A248717 Select[Range@100000,(d=IntegerDigits@#;FreeQ[d,0]&&Union@IntegerDigits[#-Times@@d]==Union@d==Union@IntegerDigits[#-Total@d])&] (* _Giorgos Kalogeropoulos_, Jul 20 2021 *)
%o A248717 (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, ", ")))
%o A248717 (Python)
%o A248717 from math import prod
%o A248717 def ok(n):
%o A248717     s = str(n); d = list(map(int, s))
%o A248717     if '0' in s: return False
%o A248717     return set(s) == set(str(n-sum(d))) and set(s) == set(str(n-prod(d)))
%o A248717 print(list(filter(ok, range(127000)))) # _Michael S. Branicky_, Jul 18 2021
%Y A248717 Cf. A248209, A248210, A007954, A007953.
%K A248717 nonn,base
%O A248717 1,1
%A A248717 _Derek Orr_, Oct 12 2014