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.
%I A376425 #10 Sep 22 2024 15:20:24 %S A376425 0,1,2,3,4,5,6,7,8,9,10,11,12,21,22,23,32,33,34,43,44,45,54,55,56,65, %T A376425 66,67,76,77,78,87,88,89,90,98,99,100,101,109,110,111,112,121,122,123, %U A376425 210,211,212,221,222,223,232,233,234,321,322,323,332,333,334,343,344,345,432 %N A376425 Numbers whose adjacent digits differ by at most 1 modulo 10. %C A376425 Neighbors of 9 are 0 and 8. %C A376425 Except for the initial zero this is a strict subsequence of A252490 which uses the same neighborhood rule for digits but considers an unordered set of digits. The first difference is that 102 is included by A252490 but excluded here. %F A376425 From _Robert Israel_, Sep 22 2024 (Start): %F A376425 Let a(n) mod 10 = d. %F A376425 If 1 <= d <= 8 then a(3 n + 6 + j) = 10 a(n) + d + j for j = -1, 0, 1. %F A376425 If d = 0 and n > 1, then a(3 n + 5) = 10 a(n), a(3 n + 6) = 10 a(n) + 1, a(3 n + 7) = 10 a(n) + 9. %F A376425 If d = 9, then a(3 n + 5) = 10 a(n), a(3 n + 6) = 10 a(n) + 8, a(3 n + 7) = 10 a(n) + 9. %F A376425 (End) %e A376425 11 is a term because 1 = 1. %e A376425 32 is a terms because 3 is a neighbor of 2. %e A376425 109 is a term because 1 is a neighbor of 0 and 0 is a neighbor of 9 (modulo 10). %e A376425 121 is a term because 1 is a neighbor of 2 and 2 is a neighbor of 1. %p A376425 f:= proc(n) local i; %p A376425 seq(10*n+i,i= sort([n-1,n,n+1] mod 10)) %p A376425 end proc: %p A376425 S:= [$1..9]: R:= 0,op(S): %p A376425 for i from 1 to 3 do %p A376425 S:= map(f,S); R:= R,op(S) %p A376425 od: %p A376425 R; # _Robert Israel_, Sep 22 2024 %o A376425 (PARI) isok(k)={my(v=digits(k)); for(i=2, #v, my(t=abs(v[i]-v[i-1])); if(t>1&&t<9, return(0))); 1} %Y A376425 Subsequence of A252490 union {0}. %Y A376425 Cf. A068148, A068149, A087553. %K A376425 nonn,base %O A376425 1,3 %A A376425 _Andrew Howroyd_, Sep 22 2024