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.

A068863 a(1) = 2; a(n+1) is the smallest prime not already in the sequence which differs from a(n) at every digit.

Original entry on oeis.org

2, 3, 5, 7, 11, 23, 17, 29, 13, 31, 19, 37, 41, 53, 47, 59, 43, 61, 73, 67, 71, 83, 79, 97, 89, 101, 223, 107, 211, 103, 227, 109, 233, 127, 239, 113, 229, 131, 257, 139, 241, 137, 251, 149, 263, 151, 269, 157, 271, 163, 277, 181, 293, 167, 281, 173, 307, 179
Offset: 1

Views

Author

Amarnath Murthy, Mar 13 2002

Keywords

Examples

			13 follows 29 as the smallest prime number not included earlier and differing at every digit position with 29.
		

Crossrefs

Cf. A068853.
Cf. A085136.
Cf. A068861.

Programs

  • Haskell
    import Data.List (delete)
    a068863 n = a068863_list !! (n-1)
    a068863_list = f "x" (map show a000040_list) where
       f p ps = g ps where
         g (q:qs)
           | and $ zipWith (/=) p q = (read q :: Int) : f q (delete q ps)
           | otherwise = g qs
    -- Reinhard Zumkeller, Dec 21 2013 [Warning: this code might not be correct - Sean A. Irvine, Mar 19 2024]

Extensions

Corrected and extended by Sascha Kurz, Feb 02 2003