OFFSET
1,1
COMMENTS
Any number not containing digits 1, 3, 7, 9 is a fixed point (A104704) and the mapping is its own inverse. - Michael S. Branicky, Sep 02 2021
LINKS
EXAMPLE
a(1) = 10 - 1 = 9, a(37) = 73, a(85) = 85.
MATHEMATICA
Table[FromDigits[If[EvenQ[#], #, 10-#]&/@IntegerDigits[n]], {n, 80}] (* Harvey P. Dale, Sep 27 2018 *)
PROG
(Python)
def f(d): return 10 - d if d%2 == 1 else d
def a(n): return int("".join(str(f(int(d))) for d in str(n)))
print([a(n) for n in range(1, 73)]) # Michael S. Branicky, Sep 02 2021
(PARI) a(n) = my(d=digits(n)); fromdigits(apply(x->if (x%2, 10-x, x), d)); \\ Michel Marcus, Sep 02 2021
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
Zak Seidov, Mar 18 2005
STATUS
approved