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.

A347182 Lexicographically earliest sequence of distinct positive integers such that all digits of a(n) are visible in a(n) * a(n+1).

This page as a plain text file.
%I A347182 #25 Aug 24 2021 17:57:55
%S A347182 1,10,11,91,9,21,6,16,26,24,18,45,12,51,3,13,27,36,38,22,56,28,29,32,
%T A347182 41,4,31,23,14,76,89,55,47,42,7,25,5,15,34,69,39,61,92,86,8,35,67,100,
%U A347182 17,43,78,87,33,71,81,64,54,66,96,72,99,101,109,90,44,102,60,46,79,48,58,98,151,75,37,19
%N A347182 Lexicographically earliest sequence of distinct positive integers such that all digits of a(n) are visible in a(n) * a(n+1).
%C A347182 a(3) = 11 has two digits "1"; they must both be visible in a(3) * a(4) and this is the case as a(3) * a(4) = 11 * 91 = 1001.
%C A347182 Is this a permutation of the positive integers? - _Pontus von Brömssen_, Aug 23 2021
%H A347182 Pontus von Brömssen, <a href="/A347182/b347182.txt">Table of n, a(n) for n = 1..10000</a>
%e A347182 a(1) * a(2) =  1 * 10 =   10;
%e A347182 a(2) * a(3) = 10 * 11 =  110;
%e A347182 a(3) * a(4) = 11 * 91 = 1001;
%e A347182 a(4) * a(5) = 91 *  9 =  819;
%e A347182 a(5) * a(6) =  9 * 21 =  189; etc.
%o A347182 (Python)
%o A347182 from collections import Counter
%o A347182 def A347182_list(n):
%o A347182     a = [1]
%o A347182     m = 2  # Smallest number not yet in a.
%o A347182     M = 1  # Largest number in a so far.
%o A347182     used = []  # Indicator for what numbers m..M that are in a so far.
%o A347182     for i in range(n - 1):
%o A347182         c0 = Counter(str(a[-1]))
%o A347182         x = m
%o A347182         while 1:
%o A347182             if x > M or not used[x - m]:
%o A347182                 c = Counter(str(a[-1] * x))
%o A347182                 if all(c[d] >= c0[d] for d in "0123456789"):
%o A347182                     break
%o A347182             x += 1
%o A347182         if x > M:
%o A347182             used.extend([0] * (x - M - 1) + [1])
%o A347182             M = x
%o A347182         else:
%o A347182             used[x - m] = 1
%o A347182         if x == m:
%o A347182             j = next((j for j in range(len(used)) if not used[j]), len(used))
%o A347182             m += j
%o A347182             del used[:j]
%o A347182         a.append(x)
%o A347182     return a  # _Pontus von Brömssen_, Aug 24 2021
%Y A347182 Cf. A347180, A347181, A347183.
%K A347182 base,nonn
%O A347182 1,2
%A A347182 _Eric Angelini_ and _Carole Dubois_, Aug 22 2021