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.

A354710 Records in A009101.

This page as a plain text file.
%I A354710 #17 Sep 06 2022 15:09:04
%S A354710 0,102,110,140,150,170,209,210,260,330,4506,11620,17054,19008,20979,
%T A354710 24120,27780,32305,32805,34590,42012,52054,55048,59049,65610,70536,
%U A354710 75006,90432,111006,112050,118098,120594,136052,150297,153302,160824,181039,183708,208044
%N A354710 Records in A009101.
%o A354710 (Python)
%o A354710 import numpy
%o A354710 input_list = []
%o A354710 output_list = []
%o A354710 max_list = []
%o A354710 range_ = 10 ** 7
%o A354710 lower = 0
%o A354710 upper = lower + range_
%o A354710 for i in range(lower, upper):
%o A354710     input_list.append(i)
%o A354710     number = str(i)
%o A354710     results_list = []
%o A354710     total = 0
%o A354710     total_list = []
%o A354710     while True:
%o A354710         number_list = []
%o A354710         for x in list(number):
%o A354710             number_list.append(int(x))
%o A354710         results_list.append(numpy.prod(number_list))
%o A354710         total += numpy.prod(number_list)
%o A354710         if total in total_list:
%o A354710             output_list.append(total_list[-1])
%o A354710             if total_list[-1] >= max(output_list):
%o A354710                 if total_list[-1] not in max_list:
%o A354710                     max_list.append(total_list[-1])
%o A354710             break
%o A354710         total_list.append(total)
%o A354710         number = str(total)
%o A354710 print(max_list)
%o A354710 (Python)
%o A354710 from math import prod
%o A354710 from itertools import count, islice
%o A354710 def pd(n): return prod(map(int, str(n)))
%o A354710 def f(x): return x + pd(x)
%o A354710 def agen(): # generator of terms
%o A354710     record, seen = -1, set()
%o A354710     for n in count(0):
%o A354710         x = pd(n)
%o A354710         if x in seen: continue
%o A354710         seen.add(x)
%o A354710         fx = f(x)
%o A354710         while x != fx: x, fx = fx, f(fx)
%o A354710         if fx > record:
%o A354710             record = fx
%o A354710             yield record
%o A354710 print(list(islice(agen(), 39))) # _Michael S. Branicky_, Jun 21 2022
%Y A354710 Cf. A009101.
%K A354710 base,nonn
%O A354710 0,2
%A A354710 _Marc-Thomas Russo_, Jun 03 2022