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

 

Logo

Annual appeal: Please make a donation to keep the OEIS running! Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A125887 a(1) = 1, a(n) = smallest positive number b not among a(1)..a(n-1) and not a multiple of 10 such that the first digit of b = the last digit of a(n-1). 2

%I

%S 1,11,12,21,13,31,14,41,15,51,16,61,17,71,18,81,19,91,101,102,22,23,

%T 32,24,42,25,52,26,62,27,72,28,82,29,92,201,103,33,34,43,35,53,36,63,

%U 37,73,38,83,39,93,301,104,44,45,54,46,64,47,74,48,84,49,94,401,105,55,56,65

%N a(1) = 1, a(n) = smallest positive number b not among a(1)..a(n-1) and not a multiple of 10 such that the first digit of b = the last digit of a(n-1).

%C A dyslexic person might have trouble distinguishing this sequence from A125886!

%H Reinhard Zumkeller, <a href="/A125887/b125887.txt">Table of n, a(n) for n = 1..10000</a>

%o (Haskell)

%o a125887 n = a125887_list !! (n-1)

%o a125887_list = 1 : f '1' (filter ((> 0) . (`mod` 10)) [11..]) where

%o f d zs = y : f (last $ show y) (xs ++ ys) where

%o (xs, y:ys) = span ((/= d) . head . show) zs

%o -- _Reinhard Zumkeller_, Jul 06 2011

%Y Cf. A125886.

%Y Cf. A000030, A010879.

%K base,nonn,look

%O 1,2

%A _Zak Seidov_, Dec 13 2006

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

License Agreements, Terms of Use, Privacy Policy .

Last modified December 13 09:05 EST 2017. Contains 295957 sequences.