A143473 Replace the leading digit d of n with 10-d (in decimal representation).
10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 30, 31
Offset: 0
Links
- R. Zumkeller, Table of n, a(n) for n = 0..9999
Programs
-
Haskell
a143473 n = foldl (\v d -> 10 * v + d) 0 $ (10 - z) : zs where (z:zs) = map (read . return) $ show n
-
Mathematica
ld10[n_]:=Module[{idn=IntegerDigits[n]},FromDigits[Join[{10-idn[[1]]},Rest[ idn]]]]; Array[ld10,100,0] (* Harvey P. Dale, May 25 2020 *)
Comments