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.

A361349 Numbers k such that A361338(k) = 10.

Original entry on oeis.org

17117, 17727, 17749, 18839, 19933, 21761, 22777, 29391, 30397, 31157, 31317, 31643, 33949, 34199, 35909, 39723, 39789, 39797, 39803, 39813, 42973, 44219, 44517, 46347, 47463, 49171, 49771, 49877, 53211, 53751, 57169, 57311, 57769, 57781, 57941, 57943, 57961, 59093
Offset: 1

Views

Author

N. J. A. Sloane, Apr 05 2023

Keywords

Crossrefs

Programs

  • Python
    from itertools import count, islice
    from math import prod
    def A361338(n):
        c, d, m = {n}, set(), 0
        while True:
            c = set(prod(divmod(k,s)) for k in c for i in range(1,len(str(k))) if k%(s:=(r:=10**(i-1))*10)>=r or i==1)
            d |= c
            if (r:=len(d)) == m:
                return sum(1 for q in d if q<10)
            m = r
    def A361349_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n:A361338(n)==10,count(max(startvalue,1)))
    A361349_list = list(islice(A361349_gen(),10)) # Chai Wah Wu, Apr 05-06 2023
    
  • Python
    from functools import lru_cache
    from itertools import count, islice
    @lru_cache(maxsize=None)
    def f(n):
        if n < 10: return {n}
        s = str(n)
        return {e for i in range(1, len(s)) if s[i]!="0" or i==len(s)-1 for e in f(int(s[:i])*int(s[i:]))}
    def agen(): # generator of terms
        yield from (k for k in count() if len(f(k)) == 10)
    print(list(islice(agen(), 38))) # Michael S. Branicky, Apr 05 2023

Extensions

a(4)-a(38) from Chai Wah Wu, Apr 05 2023