login
Replace the leading digit d of n with 10-d (in decimal representation).
2

%I #12 May 25 2020 17:33:56

%S 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,

%T 86,87,88,89,70,71,72,73,74,75,76,77,78,79,60,61,62,63,64,65,66,67,68,

%U 69,50,51,52,53,54,55,56,57,58,59,40,41,42,43,44,45,46,47,48,49,30,31

%N Replace the leading digit d of n with 10-d (in decimal representation).

%C a(n) = n iff A000030(n) = 5, cf. A217398.

%H R. Zumkeller, <a href="/A143473/b143473.txt">Table of n, a(n) for n = 0..9999</a>

%F A000030(a(n)) = 10 - A000030(n).

%t ld10[n_]:=Module[{idn=IntegerDigits[n]},FromDigits[Join[{10-idn[[1]]},Rest[ idn]]]]; Array[ld10,100,0] (* _Harvey P. Dale_, May 25 2020 *)

%o (Haskell)

%o a143473 n = foldl (\v d -> 10 * v + d) 0 $ (10 - z) : zs where

%o (z:zs) = map (read . return) $ show n

%K nonn,base,look

%O 0,1

%A _Reinhard Zumkeller_, Aug 18 2008