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.

A106001 Start S with 1; extend S with a(n) such that a(n) is the smallest unused integer so far that ends with the a(n)-th digit of S.

This page as a plain text file.
%I A106001 #25 Dec 23 2024 14:53:42
%S A106001 1,2,3,4,5,6,7,8,9,11,21,12,31,41,22,13,51,14,61,32,42,71,23,15,81,91,
%T A106001 24,16,101,33,52,34,62,17,111,72,43,121,25,18,131,19,141,82,44,151,26,
%U A106001 161,10,171,53,63,35,92,73,54,36,102,181,27,191,201,211,37,112,64
%N A106001 Start S with 1; extend S with a(n) such that a(n) is the smallest unused integer so far that ends with the a(n)-th digit of S.
%C A106001 This is a permutation of the natural numbers as, in building the sequence, we always choose the smallest integer not yet present.
%C A106001 The inverse is A252781. _Eric Angelini_, Jan 16 2015
%H A106001 Paul Tek, <a href="/A106001/b106001.txt">Table of n, a(n) for n = 1..10000</a>
%H A106001 Éric Angelini, <a href="https://web.archive.org/web/*/http://list.seqfan.eu/oldermail/seqfan/2015-January/014300.html">The a(n)th term of S ends with the a(n)th digit of S</a>, SeqFan list, Jan 15 2015.
%H A106001 Paul Tek, <a href="/A106001/a106001.txt">PERL program for this sequence</a>
%H A106001 <a href="/index/Fi#final">Index entries for sequences related to final digits of numbers</a>
%H A106001 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%e A106001 Last digits are: (1), (2), (3), (4), (5), (6), (7), (8), (9), 1(1), 2(1), 1(2), 3(1), 4(1), 2(2), 1(3), 5(1), 1(4), 6(1), 3(2), 4(2),... which form (1), (2), (3), (4), (5), (6), (7), (8), (9), (1), (1), (2), (1), (1), (2), (3), (1), (4), (1), (2), (2)... then 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 2, 1, 1, 2, 3, 1, 4, 1, 2, 2,... which can be seen as 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 21, 12, 31, 41, 22,... thus the starting sequence.
%o A106001 (Haskell)
%o A106001 import Data.List (delete)
%o A106001 a250310 n = a250310_list !! (n-1)
%o A106001 a250310_list = [1..9] ++ [11] ++ f ([0..9] ++ [1,1]) 11 (10 : [12..])
%o A106001     where f ss i zs = g zs where
%o A106001         g (x:xs) = if ss !! i /= mod x 10
%o A106001             then g xs
%o A106001             else x : f (ss ++ map (read . return) (show x))
%o A106001                 (i + 1) (delete x zs)
%o A106001 -- Reinhard Zumkeller, Jan 16 2015
%Y A106001 Cf. A010879, A252781 (inverse), A126968
%K A106001 base,easy,nonn,look
%O A106001 1,2
%A A106001 _Eric Angelini_, Apr 25 2005, revised Dec 06 2007
%E A106001 Data corrected by _Paul Tek_, Aug 11 2013