OFFSET
1,2
COMMENTS
This sequence is a permutation of the positive integers with inverse A375759.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
Rémy Sigrist, PARI program
EXAMPLE
The first terms are:
n a(n) a(n)/A30(n) | n a(n) a(n)/A30(n)
-- ---- ----------- | -- ---- -----------
1 1 1 | 16 16 16
2 2 1 | 17 17 17
3 3 1 | 18 18 18
4 4 1 | 19 19 19
5 5 1 | 20 20 10
6 6 1 | 21 22 11
7 7 1 | 22 24 12
8 8 1 | 23 26 13
9 9 1 | 24 28 14
10 10 10 | 25 30 15
11 11 11 | 26 32 16
12 12 12 | 27 34 17
13 13 13 | 28 36 18
14 14 14 | 29 38 19
15 15 15 | 30 21 7
PROG
(PARI) \\ See Links section.
(Python)
from itertools import count, islice
def agen(): # generator of terms
aset, m = set(), 1
for n in count(1):
n1 = int(str(n)[0])
an = next(k for k in count(m) if k not in aset and k%n1 == 0)
yield an
aset.add(an)
while m in aset: m += 1
print(list(islice(agen(), 67))) # Michael S. Branicky, Jan 27 2025
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Aug 26 2024
STATUS
approved
