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!)
A252079 Fixed points of permutations A252022 and A252023. 4

%I #8 Dec 14 2014 23:17:27

%S 1,2,3,4,5,36,72,125,136,900,4454,8021,27223,33905,73222,127536,

%T 146353,180177,234668,273241

%N Fixed points of permutations A252022 and A252023.

%o (Haskell)

%o a252079 n = a252079_list !! (n-1)

%o a252079_list = [x | x <- [1..], a252022 x == x]

%o (Python)

%o A252079_list, l, s, b = [1], [1], 2, set()

%o for n in range(2,10**5):

%o ....i = s

%o ....while True:

%o ........if i not in b:

%o ............li = [int(d) for d in str(i)[::-1]]

%o ............for x,y in zip(li,l):

%o ................if x+y > 9:

%o ....................break

%o ............else:

%o ................l = li

%o ................b.add(i)

%o ................if i == n:

%o ....................A252079_list.append(i)

%o ................while s in b:

%o ....................b.remove(s)

%o ....................s += 1

%o ................break

%o ........i += 1 # _Chai Wah Wu_, Dec 14 2014

%Y Cf. A252022, A252023, A252078.

%K nonn,more

%O 1,2

%A _Reinhard Zumkeller_, Dec 13 2014

%E a(16)-a(20) from _Chai Wah Wu_, Dec 14 2014

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 25 16:42 EDT 2024. Contains 371989 sequences. (Running on oeis4.)