cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A252079 Fixed points of permutations A252022 and A252023.

This page as a plain text file.
%I A252079 #11 Nov 16 2024 16:58:17
%S A252079 1,2,3,4,5,36,72,125,136,900,4454,8021,27223,33905,73222,127536,
%T A252079 146353,180177,234668,273241
%N A252079 Fixed points of permutations A252022 and A252023.
%o A252079 (Haskell)
%o A252079 a252079 n = a252079_list !! (n-1)
%o A252079 a252079_list = [x | x <- [1..], a252022 x == x]
%o A252079 (Python)
%o A252079 A252079_list, l, s, b = [1], [1], 2, set()
%o A252079 for n in range(2, 10**5):
%o A252079     i = s
%o A252079     while True:
%o A252079         if i not in b:
%o A252079             li = [int(d) for d in str(i)[::-1]]
%o A252079             for x, y in zip(li, l):
%o A252079                 if x+y > 9:
%o A252079                     break
%o A252079             else:
%o A252079                 l = li
%o A252079                 b.add(i)
%o A252079                 if i == n:
%o A252079                     A252079_list.append(i)
%o A252079                 while s in b:
%o A252079                     b.remove(s)
%o A252079                     s += 1
%o A252079                 break
%o A252079         i += 1 # _Chai Wah Wu_, Dec 14 2014
%Y A252079 Cf. A252022, A252023, A252078.
%K A252079 nonn,more
%O A252079 1,2
%A A252079 _Reinhard Zumkeller_, Dec 13 2014
%E A252079 a(16)-a(20) from _Chai Wah Wu_, Dec 14 2014