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.

Original entry on oeis.org

119, 1236, 11359, 11449, 122669, 2334699, 13346899
Offset: 1

Views

Author

Ilya Orlov, Jun 30 2022

Keywords

Comments

From Michael S. Branicky, Jun 30 2022: (Start)
No more terms. [updated Jul 01 2022]
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)
a(n) is a digit permutation of A062237(n+9). - Thomas Scheuerle, Jun 30 2022

Examples

			11359 is a term since 1+1+3+5+9 = 19, 1*1*3*5*9 = 135, and 19135 is an anagram of 11359.
		

Crossrefs

Cf. A062237.

Programs

  • Python
    import math
    def is_ok(num):
        nums = [int(i) for i in str(num)]
        summa = sum(nums)
        prods = math.prod(nums)
        syms_1 = [str(i) for i in nums]
        syms_2 = [i for i in str(summa)] + [i for i in str(prods)]
        if syms_1 == sorted(syms_2):
            return True
        return False
    
  • Python
    from math import prod
    from itertools import count, islice, combinations_with_replacement as mc
    def c(s):
        d = list(map(int, s))
        return sorted(s) == sorted(str(sum(d)) + str(prod(d)))
    def ndgen(d): yield from ("".join(m) for m in mc("123456789", d))
    def agen(): yield from (int(s) for d in count(1) for s in ndgen(d) if c(s))
    print(list(islice(agen(), 7))) # Michael S. Branicky, Jun 30 2022