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.

A358054 Starting with 0, smallest integer not yet in the sequence such that no two neighboring digits differ by 1.

This page as a plain text file.
%I A358054 #39 Nov 07 2022 17:02:58
%S A358054 0,2,4,1,3,5,7,9,6,8,11,13,14,15,16,17,18,19,20,22,24,25,26,27,28,29,
%T A358054 30,31,33,35,36,37,38,39,40,41,42,44,46,47,48,49,50,51,52,53,55,57,58,
%U A358054 59,60,61,62,63,64,66,68,69,70,71,72,73,74,75,77,79,90,80
%N A358054 Starting with 0, smallest integer not yet in the sequence such that no two neighboring digits differ by 1.
%C A358054 Integers such as 10, 12, 21, 76, 6792, and 10744 (see A082927) will not appear in the sequence as they contain adjacent digits that differ by 1. Some integers may be disallowed only temporarily; for example, if a(n) = 79, and all nonnegative integers < 79 are already in the sequence, then a(n+1) = 90, because a(n+1) must not start with an 8, as it would differ by 1 from the digit "9" in 79. Now, a(n+2) can equal 80.
%H A358054 Gavin Lupo, <a href="/A358054/b358054.txt">Table of n, a(n) for n = 0..5000</a>
%H A358054 David A. Corneth, <a href="/A358054/a358054.gp.txt">PARI program</a>
%e A358054 a(0) = 0.
%e A358054 a(1) = 2. Cannot be 1. Smallest integer that can be placed = 2.
%e A358054 a(2) = 4. Cannot be 1 or 3. Smallest integer that can be placed = 4.
%e A358054 a(3) = 1. Cannot be 3 or 5. Smallest integer that can be placed = 1.
%e A358054 ...
%e A358054 (Nonnegative integers < 86, disregarding invalid integers, have already appeared.)
%e A358054 a(74) = 86.
%e A358054 a(75) = 88. Cannot be 87, as it contains adjacent digits that differ by 1. Smallest integer that can be placed = 88.
%e A358054 a(76) = 111. Cannot be 89, 90->99 (9 and 8 differ by 1), or 100->110 (1 and 0 are adjacent and differ by 1). Smallest integer that can be placed = 111.
%o A358054 (PARI) \\ See PARI link \\ _David A. Corneth_, Oct 31 2022
%Y A358054 Cf. A082927, A219250.
%K A358054 nonn,base,easy
%O A358054 0,2
%A A358054 _Gavin Lupo_ and _Eric Angelini_, Oct 28 2022