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.

A339853 Read one digit d at the time, starting from the first one; extend S with the smallest multiple of d not yet present in the sequence. Zeros are not read.

This page as a plain text file.
%I A339853 #21 Dec 22 2020 03:47:12
%S A339853 1,2,4,8,16,3,6,9,12,18,5,10,7,24,15,11,14,20,28,13,25,17,19,21,32,22,
%T A339853 26,40,23,27,30,35,29,42,31,36,34,33,39,38,44,46,48,54,52,50,45,56,49,
%U A339853 51,57,55,58,63,60,62,66,37,69,72,75,64,78,81,84,90,87,80,68,76,88,96,92,104,65,100,70,74,85,108
%N A339853 Read one digit d at the time, starting from the first one; extend S with the smallest multiple of d not yet present in the sequence. Zeros are not read.
%C A339853 This is a permutation of the integers > 0 (as the prime numbers are multiples of 1).
%H A339853 Carole Dubois, <a href="/A339853/b339853.txt">Table of n, a(n) for n = 1..5000</a>
%H A339853 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%e A339853 The first d is 1; as 1 is already in the sequence, we extend it with 2;
%e A339853 the next d is now 2; as 2 is already in the sequence, we extend it with 4 (smallest multiple of 2 not in the sequence);
%e A339853 the next d is 4; as 4 is already in the sequence, we extend it with 8 (smallest multiple);
%e A339853 the next d is 8; as 8 is already in the sequence, we extend it with 16 (smallest multiple);
%e A339853 the next d is 1; we extend the sequence with 3 as 3 is the smallest multiple of 1 not yet present in the sequence;
%e A339853 the next d is 6; as 6 is not yet present, we extend the sequence with 6;
%e A339853 the next d is 3; we extend the sequence with 9 as 9 is the smallest multiple of 3 not yet present;
%e A339853 the next d is 6; we extend the sequence with 12 as 12 is the smallest multiple of 6 not yet present; etc.
%e A339853 As the zero of 10 will not be read, we will extend the sequence at that point with the smallest multiple of 7 not yet present -- which is 14.
%o A339853 (Python)
%o A339853 def aupto(n):
%o A339853   alst, astr, used, strind = [1], "1", {1}, 0
%o A339853   for k in range(1, n):
%o A339853     while astr[strind] == "0": strind += 1
%o A339853     ak = digit = int(astr[strind])
%o A339853     while ak in used: ak += digit
%o A339853     alst.append(ak); astr += str(ak); used.add(ak); strind += 1
%o A339853   return alst    # use alst[n-1] for a(n)
%o A339853 print(aupto(71)) # _Michael S. Branicky_, Dec 19 2020
%Y A339853 Cf. A316749.
%K A339853 base,nonn
%O A339853 1,2
%A A339853 _Eric Angelini_ and _Carole Dubois_, Dec 19 2020