A194233 Smallest number greater than n with exactly the same digits as n in decimal representation, a(n)=10*n if no such number exists.
10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 21, 31, 41, 51, 61, 71, 81, 91, 200, 210, 220, 32, 42, 52, 62, 72, 82, 92, 300, 310, 320, 330, 43, 53, 63, 73, 83, 93, 400, 410, 420, 430, 440, 54, 64, 74, 84, 94, 500, 510, 520, 530, 540, 550, 65, 75, 85, 95
Offset: 1
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Programs
-
Haskell
import Data.List (find); import Data.Maybe (fromMaybe) a194233 n = fromMaybe (10*n) $ find (== a004186 n) $ map a004186 [n+1..10*n]
Comments