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.

A068148 Primes in which neighboring digits differ at most by 1.

This page as a plain text file.
%I A068148 #18 Mar 13 2023 07:19:31
%S A068148 2,3,5,7,11,23,43,67,89,101,109,211,223,233,433,443,677,787,877,887,
%T A068148 1009,1109,1123,1223,2111,2221,2333,3221,3323,3343,3433,4567,5443,
%U A068148 7789,7877,8887,8999,9001,9011,9887,9901,10009,10099,10111,10909,10987,12101,12109
%N A068148 Primes in which neighboring digits differ at most by 1.
%C A068148 Neighbors of 9 are 0 and 8 and 9.
%H A068148 T. D. Noe, <a href="/A068148/b068148.txt">Table of n, a(n) for n=1..1000</a>
%t A068148 Do[a = IntegerDigits[ Prime[n]]; k = 1; l = Length[a]; While[k < l && (Abs[a[[k]]- a[[k + 1]]] < 2 || Abs[a[[k]] - a[[k + 1]]] > 8), k++ ]; If[k == l, Print[ Prime[n]]], {n, 1, 10^4} ]
%t A068148 Select[Prime[Range[1500]],Max[Abs[Differences[IntegerDigits[#]]]/.{9->1}] < 2&] (* _Harvey P. Dale_, Jan 31 2012 *)
%o A068148 (Haskell)
%o A068148 a068148 n = a068148_list !! (n-1)
%o A068148 a068148_list = filter ((== 1) . a010051') a032981_list
%o A068148 -- _Reinhard Zumkeller_, Feb 14 2015
%Y A068148 Cf. A010051, subsequence of A032981.
%K A068148 base,easy,nonn,nice
%O A068148 1,1
%A A068148 _Amarnath Murthy_, Feb 23 2002
%E A068148 Edited and extended by _Robert G. Wilson v_ and _Sascha Kurz_, Mar 01 2002
%E A068148 Corrected by _T. D. Noe_, Feb 15 2008