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

%I #24 Sep 02 2021 08:19:44

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

%T 23,28,21,70,79,72,77,74,75,76,73,78,71,40,49,42,47,44,45,46,43,48,41,

%U 50,59,52,57,54,55,56,53,58,51,60,69,62,67,64,65,66,63,68,61,30,39,32

%N Rearrangement of positive integers: change odd digits d to 10-d.

%C 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

%H Michael S. Branicky, <a href="/A104696/b104696.txt">Table of n, a(n) for n = 1..10000</a>

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

%e a(1) = 10 - 1 = 9, a(37) = 73, a(85) = 85.

%t Table[FromDigits[If[EvenQ[#],#,10-#]&/@IntegerDigits[n]],{n,80}] (* _Harvey P. Dale_, Sep 27 2018 *)

%o (Python)

%o def f(d): return 10 - d if d%2 == 1 else d

%o def a(n): return int("".join(str(f(int(d))) for d in str(n)))

%o print([a(n) for n in range(1, 73)]) # _Michael S. Branicky_, Sep 02 2021

%o (PARI) a(n) = my(d=digits(n)); fromdigits(apply(x->if (x%2, 10-x, x), d)); \\ _Michel Marcus_, Sep 02 2021

%Y Cf. A104697, A104702, A104703, A104704 (fixed points).

%K easy,nonn,base

%O 1,1

%A _Zak Seidov_, Mar 18 2005

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 April 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)