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.

A032981 Positive numbers with the property that all pairs of consecutive base-10 digits differ by 0 or 1.

This page as a plain text file.
%I A032981 #21 Feb 13 2021 01:12:00
%S A032981 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,66,
%T A032981 67,76,77,78,87,88,89,98,99,100,101,110,111,112,121,122,123,210,211,
%U A032981 212,221,222,223,232,233,234,321,322,323,332,333,334,343,344,345
%N A032981 Positive numbers with the property that all pairs of consecutive base-10 digits differ by 0 or 1.
%C A032981 a(n) = A178403(n+1) for n < 38. - _Reinhard Zumkeller_, May 27 2010
%H A032981 Alois P. Heinz, <a href="/A032981/b032981.txt">Table of n, a(n) for n = 1..10000</a>
%t A032981 okQ[n_]:=Max[Abs[Last[#]-First[#]]&/@Partition[IntegerDigits[n],2,1]]<2
%t A032981 Select[Range[350],okQ]  (* _Harvey P. Dale_, Feb 14 2011 *)
%o A032981 (Haskell)
%o A032981 a032981 n = a032981_list !! (n-1)
%o A032981 a032981_list = map read $ filter f $ map show [1..] :: [Int] where
%o A032981    f ps = all (`elem` neighbours) $ zipWith ((. return) . (:)) ps (tail ps)
%o A032981    neighbours = "09" : "90" : zipWith ((. return) . (:))
%o A032981       (digs ++ tail digs ++ init digs) (digs ++ init digs ++ tail digs)
%o A032981    digs = "0123456789"
%o A032981 -- _Reinhard Zumkeller_, Feb 14 2015
%Y A032981 Cf. A068148 (primes).
%K A032981 nonn,base
%O A032981 1,2
%A A032981 _Clark Kimberling_