login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A068861 a(1) = 1; a(n+1) is the smallest number not already in the sequence which differs from a(n) at every digit. 5
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 21, 12, 20, 11, 22, 13, 24, 15, 23, 14, 25, 16, 27, 18, 26, 17, 28, 19, 30, 29, 31, 40, 32, 41, 33, 42, 34, 43, 35, 44, 36, 45, 37, 46, 38, 47, 39, 48, 50, 49, 51, 60, 52, 61, 53, 62, 54, 63, 55, 64, 56, 65, 57, 66, 58, 67, 59, 68, 70, 69, 71, 80 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Paul Tek, Table of n, a(n) for n = 1..10000

EXAMPLE

11 follows 20 as the smallest number not included earlier and differing at every digit position.

PROG

(Haskell)

import Data.List (delete)

a068861 n = a068861_list !! (n-1)

a068861_list = f "x" (map show [1..]) where

   f u us = g us where

     g (v:vs)

       | and $ zipWith (/=) u v = (read v :: Int) : f v (delete v us)

       | otherwise = g vs

-- Reinhard Zumkeller, Dec 21 2013

CROSSREFS

Cf. A068860, A068863.

Cf. A067581.

Sequence in context: A223080 A248651 A306361 * A256079 A216556 A068860

Adjacent sequences:  A068858 A068859 A068860 * A068862 A068863 A068864

KEYWORD

nonn,base

AUTHOR

Amarnath Murthy, Mar 13 2002

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 15 20:42 EDT 2019. Contains 327087 sequences. (Running on oeis4.)