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.

A375758 Lexicographically earliest sequence of distinct positive integers such that for any n > 0, the initial digit of n divides a(n).

This page as a plain text file.
%I A375758 #11 Jan 27 2025 09:39:56
%S A375758 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,22,24,26,28,30,32,
%T A375758 34,36,38,21,27,33,39,42,45,48,51,54,57,40,44,52,56,60,64,68,72,76,80,
%U A375758 25,35,50,55,65,70,75,85,90,95,66,78,84,96,102,108,114
%N A375758 Lexicographically earliest sequence of distinct positive integers such that for any n > 0, the initial digit of n divides a(n).
%C A375758 This sequence is a permutation of the positive integers with inverse A375759.
%H A375758 Rémy Sigrist, <a href="/A375758/b375758.txt">Table of n, a(n) for n = 1..10000</a>
%H A375758 Rémy Sigrist, <a href="/A375758/a375758.gp.txt">PARI program</a>
%H A375758 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%e A375758 The first terms are:
%e A375758   n   a(n)  a(n)/A30(n)  |  n   a(n)  a(n)/A30(n)
%e A375758   --  ----  -----------  |  --  ----  -----------
%e A375758    1     1            1  |  16    16           16
%e A375758    2     2            1  |  17    17           17
%e A375758    3     3            1  |  18    18           18
%e A375758    4     4            1  |  19    19           19
%e A375758    5     5            1  |  20    20           10
%e A375758    6     6            1  |  21    22           11
%e A375758    7     7            1  |  22    24           12
%e A375758    8     8            1  |  23    26           13
%e A375758    9     9            1  |  24    28           14
%e A375758   10    10           10  |  25    30           15
%e A375758   11    11           11  |  26    32           16
%e A375758   12    12           12  |  27    34           17
%e A375758   13    13           13  |  28    36           18
%e A375758   14    14           14  |  29    38           19
%e A375758   15    15           15  |  30    21            7
%o A375758 (PARI) \\ See Links section.
%o A375758 (Python)
%o A375758 from itertools import count, islice
%o A375758 def agen(): # generator of terms
%o A375758     aset, m = set(), 1
%o A375758     for n in count(1):
%o A375758         n1 = int(str(n)[0])
%o A375758         an = next(k for k in count(m) if k not in aset and k%n1 == 0)
%o A375758         yield an
%o A375758         aset.add(an)
%o A375758         while m in aset: m += 1
%o A375758 print(list(islice(agen(), 67))) # _Michael S. Branicky_, Jan 27 2025
%Y A375758 Cf. A000030, A308539, A375759 (inverse).
%K A375758 nonn,base
%O A375758 1,2
%A A375758 _Rémy Sigrist_, Aug 26 2024