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.

A376905 Lexicographically earliest sequence of distinct positive integers with a(1) multiples of a number b(1) followed by a(2) multiples of a number b(2) etc.

This page as a plain text file.
%I A376905 #13 Oct 19 2024 08:36:02
%S A376905 1,2,4,3,6,9,12,5,10,15,7,14,21,28,35,42,8,16,24,32,40,48,56,64,72,11,
%T A376905 22,33,44,55,66,77,88,99,110,121,132,13,26,39,52,65,17,34,51,68,85,
%U A376905 102,119,136,153,170,18,36,54,90,108,126,144,162,180,198,216
%N A376905 Lexicographically earliest sequence of distinct positive integers with a(1) multiples of a number b(1) followed by a(2) multiples of a number b(2) etc.
%C A376905 This sequence combines features of Golomb's sequence (A001462) and A361748.
%C A376905 This sequence is a permutation of the positive integers with inverse A376904.
%C A376905 This sequence can also be seen as an irregular table whose n-th row contains a(n) multiples of its leading term.
%H A376905 Rémy Sigrist, <a href="/A376905/b376905.txt">Table of n, a(n) for n = 1..10063</a>
%H A376905 Rémy Sigrist, <a href="/A376905/a376905.gp.txt">PARI program</a>
%H A376905 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%e A376905 The first terms/rows are:
%e A376905   n  a(n)  b(n)  n-th row
%e A376905   -  ----  ----  -------------------------------------------------
%e A376905   1     1     1  1
%e A376905   2     2     2  2, 4
%e A376905   3     4     3  3, 6, 9, 12
%e A376905   4     3     5  5, 10, 15
%e A376905   5     6     7  7, 14, 21, 28, 35, 42
%e A376905   6     9     8  8, 16, 24, 32, 40, 48, 56, 64, 72
%e A376905   7    12    11  11, 22, 33, 44, 55, 66, 77, 88, 99, 110, 121, 132
%e A376905   8     5    13  13, 26, 39, 52, 65
%e A376905   9    10    17  17, 34, 51, 68, 85, 102, 119, 136, 153, 170
%o A376905 (Python)
%o A376905 from itertools import count, islice
%o A376905 def A376905gen(): # generator of terms
%o A376905     aset, alst, m = {1, 2, 4}, [1, 2, 4], 3
%o A376905     yield from [1, 2, 4]
%o A376905     for n in count(3):
%o A376905         nlst = []
%o A376905         for k in count(m, m):
%o A376905             if k not in aset:
%o A376905                 nlst.append(k)
%o A376905                 if len(nlst) == alst[n-1]:
%o A376905                     break
%o A376905         yield from nlst
%o A376905         alst.extend(nlst)
%o A376905         aset.update(nlst)
%o A376905         while m in aset: m += 1
%o A376905 print(list(islice(A376905gen(), 70))) # _Michael S. Branicky_, Oct 16 2024
%o A376905 (PARI) \\ See Links section.
%Y A376905 Cf. A001462, A361748, A376903, A376906 (inverse), A377093.
%K A376905 nonn,tabf
%O A376905 1,2
%A A376905 _Rémy Sigrist_, Oct 08 2024