login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A104696 Rearrangement of positive integers: change odd digits d to 10-d. 5
9, 2, 7, 4, 5, 6, 3, 8, 1, 90, 99, 92, 97, 94, 95, 96, 93, 98, 91, 20, 29, 22, 27, 24, 25, 26, 23, 28, 21, 70, 79, 72, 77, 74, 75, 76, 73, 78, 71, 40, 49, 42, 47, 44, 45, 46, 43, 48, 41, 50, 59, 52, 57, 54, 55, 56, 53, 58, 51, 60, 69, 62, 67, 64, 65, 66, 63, 68, 61, 30, 39, 32 (list; graph; refs; listen; history; text; internal format)
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
Cf. A104697, A104702, A104703, A104704 (fixed points).
Sequence in context: A010537 A234371 A172423 * A086088 A231986 A347329
KEYWORD
easy,nonn,base
AUTHOR
Zak Seidov, Mar 18 2005
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 8 15:46 EDT 2024. Contains 372340 sequences. (Running on oeis4.)