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.

A355377 Numbers k such that the concatenation of digits included in the sum and product of the digits of the number k is an anagram of the number k, and digits of the number are sorted in nondecreasing order.

This page as a plain text file.
%I A355377 #41 Jul 01 2022 22:08:54
%S A355377 119,1236,11359,11449,122669,2334699,13346899
%N A355377 Numbers k such that the concatenation of digits included in the sum and product of the digits of the number k is an anagram of the number k, and digits of the number are sorted in nondecreasing order.
%C A355377 From _Michael S. Branicky_, Jun 30 2022: (Start)
%C A355377 No more terms. [updated Jul 01 2022]
%C A355377 There are no terms > 10^87. If k is a d-digit number, Sum(digits(k)) <= 9*n, Product(digits(k)) <= 9^n, and d exceeds the sum of the number of digits in the latter two for d >= 88. (End)
%C A355377 a(n) is a digit permutation of A062237(n+9). - _Thomas Scheuerle_, Jun 30 2022
%e A355377 11359 is a term since 1+1+3+5+9 = 19, 1*1*3*5*9 = 135, and 19135 is an anagram of 11359.
%o A355377 (Python)
%o A355377 import math
%o A355377 def is_ok(num):
%o A355377     nums = [int(i) for i in str(num)]
%o A355377     summa = sum(nums)
%o A355377     prods = math.prod(nums)
%o A355377     syms_1 = [str(i) for i in nums]
%o A355377     syms_2 = [i for i in str(summa)] + [i for i in str(prods)]
%o A355377     if syms_1 == sorted(syms_2):
%o A355377         return True
%o A355377     return False
%o A355377 (Python)
%o A355377 from math import prod
%o A355377 from itertools import count, islice, combinations_with_replacement as mc
%o A355377 def c(s):
%o A355377     d = list(map(int, s))
%o A355377     return sorted(s) == sorted(str(sum(d)) + str(prod(d)))
%o A355377 def ndgen(d): yield from ("".join(m) for m in mc("123456789", d))
%o A355377 def agen(): yield from (int(s) for d in count(1) for s in ndgen(d) if c(s))
%o A355377 print(list(islice(agen(), 7))) # _Michael S. Branicky_, Jun 30 2022
%Y A355377 Cf. A062237.
%K A355377 nonn,base,fini,full
%O A355377 1,1
%A A355377 _Ilya Orlov_, Jun 30 2022